Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: Re: OT: JavaJunkies (Javamonks sorta)

by Vautrin (Hermit)
on Feb 06, 2004 at 17:20 UTC ( [id://327148]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: OT: JavaJunkies (Javamonks sorta)
in thread OT: JavaJunkies (Javamonks sorta)

I've often wondered about this. What, precisely, "turns off" someone about having shorthand notation for things?

There are a lot of things businesses and people in general look at when trying to figure out what language to program things in. One of the major concerns is whether or not code can be maintained. Part of this is readability. Readability can go down dramatically if you're trying to understand the code of someone who likes to use "slick tricks"

A good example of this is "magical" functions and variables, i.e. $_, @_, split, print, tr///, s///, //, etc.... Sometimes it makes a lot of sense to use the shorthand form (i.e. shift; instead of my $foo = shift (@_);) Other times it makes code confusing and errors hard to catch.

This is not to say that languages that support terseness are bad (it's mostly the way people use "contractions", as you called them). But because with some languages such terseness is not possible, obfusication becomes hard, and the readibility goes up. The silly thing about all of this is if coding standards were implemented so that readable code was created, languages where terseness was possible would be used more (IMHO). But that's some people for you -- instead of allowing coders bend and break the rules when it is good to do so, all rule bending/breaking is verboten. Go figure.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: OT: JavaJunkies (Javamonks sorta)
by chaoticset (Chaplain) on Feb 06, 2004 at 23:54 UTC
    But because with some languages such terseness is not possible, obfusication becomes hard, and the readibility goes up.
    Yes, but that's really my question -- why are people willing to endure "hardness" in spoken or written English, but not in code?

    No one would seriously suggest that people stop using contractions or acronyms. NASA is easier than National Aeronautics and Space Administration, but nobody begrudges the use of the term. Why is $_ different?

    Which is a misleading question -- it's not different at all in concrete terms so I guess the question should really be why do people think about them differently?



    -----------------------
    You are what you think.

      People think about them differently because somebody who doesn't know perl and sees the camel obfu or badly written code and thinks it's insane. It's about perception. People who see java and know another traditional language (like C++) can follow along much easier then hard to read Perl code (although I would argue that good perl code is just as easy to read).

      Want to support the EFF and FSF buy buying cool stuff? Click here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://327148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-16 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found