Slashdot Mirror


Is Perl Better Than a Randomly Generated Programming Language?

First time accepted submitter QuantumMist writes "Researchers from Southern Illinois University have published a paper comparing Perl to Quorum(PDF) (their own statistically informed programming language) and Randomo (a programming language whose syntax is partially randomly generated). From the paper: 'Perl users were unable to write programs more accurately than those using a language designed by chance.' Reactions have been enthusiastic, and the authors have responded."

538 comments

  1. Better? by Hognoxious · · Score: 5, Funny

    Better? How about we start with distinguishable?

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:Better? by Chris+Burke · · Score: 5, Funny

      Indeed. This is the reason why the Obfuscated Perl Contest is run by the Department of Redundancy Department.

      --

      The enemies of Democracy are
    2. Re:Better? by Anonymous Coward · · Score: 0

      My thoughts exactly - my first thought looking at the heading was "I thought perl was a randomly generated language".

      Anyone who's read the Camel book would agree.

    3. Re:Better? by Smallpond · · Score: 5, Informative

      Yet another ridiculous summary. The study wasn't which language was better, it was in which language can first-time users write a program more accurately. My guess is that Cobol would beat any of the three - it is designed from the ground up to be readable.

    4. Re:Better? by McGuirk · · Score: 1

      You realize we're comparing this to Perl, right?

    5. Re:Better? by mwvdlee · · Score: 2

      COBOL is designed to be readable, but it's hardly writable.
      (roughly 10 years of experience developing COBOL code).

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    6. Re:Better? by jd · · Score: 1

      Nonono, it's pseudorandom. They just used a very good function.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    7. Re:Better? by GodInHell · · Score: 1

      Ah, Good Old DRD Department. What would we do without them?

      -GiH

    8. Re:Better? by Junta · · Score: 2

      Indeed. vim is impossible for a first-time user. That does not mean it is a terrible editor. Over-emphasizing day 1 productivity is a bad thing when most of your days will not be 'day 1'.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    9. Re:Better? by Chris+Burke · · Score: 1

      Over-emphasizing day 1 productivity is a bad thing when most of your days will not be 'day 1'.

      Yeah, well if that guy from Memento tries his hand at programming, then maximizing day (or hour) 1 productivity would be of the utmost importance!

      --

      The enemies of Democracy are
    10. Re:Better? by sycodon · · Score: 2

      No one writes COBOL anymore.

      We just tweak it.

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    11. Re:Better? by Anonymous Coward · · Score: 0

      Very insightful.

      I was wondering if you could you tell me how this comment relates to your daily activity of eating a fat sack?

      kthxbai

    12. Re:Better? by Anonymous Coward · · Score: 0

      Oh yeah, the DRD Department. I really don't know what we'd do without them.

    13. Re:Better? by mikael_j · · Score: 1

      I've tried writing COBOL and quite frankly it has some weird stuff going on compared to more modern languages that seriously makes it harder to learn than languages like Python and Perl.

      Just because it's readable doesn't mean it's intuitive...

      --
      Greylisting is to SMTP as NAT is to IPv4
    14. Re:Better? by q.kontinuum · · Score: 1

      This is one of the strengths of perl. It is the only scripting language with in-source encryption, so basically you can comply to Open Source rules and still keep the functionalities and algorithms of the software confidential.

      --
      Trolling is a art!
    15. Re:Better? by Cro+Magnon · · Score: 2

      As I understand it, there was only one original COBOL program ever written. Everyone else copied & modified it for their purpose.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    16. Re:Better? by Anonymous Coward · · Score: 0

      Thus, the use of the term "Read Only Language" for COBOL.

    17. Re:Better? by uigrad_2000 · · Score: 1

      The "perl users" referred to by the summary were in fact novices that had never used Perl before.

      This is an example of how changing just a word or two makes an entirely different story.

      --
      Free unix account: freeshell.org
    18. Re:Better? by Chris+Burke · · Score: 1

      I really don't know what we'd do without them.

      The same things as now, but only once.

      --

      The enemies of Democracy are
    19. Re:Better? by PoopCat · · Score: 1

      Interestingly enough, the DRDD installed an ATM machine that you didn't have to enter a PIN number into to access your cash.

  2. Next question by Weezul · · Score: 1

    How does C++ fair? LOL

    --
    The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    1. Re:Next question by Halo1 · · Score: 5, Funny

      How does C++ fair?

      Farely average.

      --
      Donate free food here
    2. Re:Next question by Anonymous Coward · · Score: 2, Funny

      How does C++ fair? LOL

      #%@$&#@^UGSOWDYRO&F@#L(EGFGP*$TW

      This Script written in Perl computes the answer.

    3. Re:Next question by Anonymous Coward · · Score: 0

      Omg that post was teh funnay! Us java weenies are teh smart amirite?!

    4. Re:Next question by Smallpond · · Score: 1

      In a productivity study of experienced users, perl & python were best and C++ worst in both time to finish and lines of code.

      http://www.connellybarnes.com/documents/language_productivity.pdf

    5. Re:Next question by Anonymous Coward · · Score: 0

      Was one of the assignments to write Battlefield 3?

      It's easy being easy when the problem domain is restricted to easy shit.

    6. Re:Next question by h4rr4r · · Score: 1

      Far more problems fall into what you seem to consider "easy". My guess is you don't know either language nor what a hard problem really is.

    7. Re:Next question by Anonymous Coward · · Score: 0

      # = start of comment in Perl. As usual, 0 clue by most Perl haters.

    8. Re:Next question by element-o.p. · · Score: 1
      Cool, but I'd be curious how the languages fared in other metrics as well. For example:
      1. Errors per line of code at initial run/compile, as appropriate;
      2. Time to debug;
      3. Number of times run/compiled until the program has been debugged;
      4. Time to modify when the software requirements change; and
      5. Number of new errors introduced when the software requirements changed.

      I've used Python, and Perl is my "goto" language (sorry, bad pun) so I tend to suspect they would do better than C/C++ in these areas too, but it would be nice to have a study supporting or even refuting that theory.

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    9. Re:Next question by Weezul · · Score: 1

      I know C++ fairly well, trust me, it's the most pointlessly complex language on the planet. And the boilerplate goes on forever.

      C++ might have developed sanely if they'd introduced it's major features in reverse order, i.e. lambdas way back in 1983, templates a bit later, and class methods only during the last decade. As it stands, there are basically two types of C++ code : code that badly emulates functional programming styles, and code consisting entirely of calls to simple wrappers around extern "C" functions.

      --
      The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    10. Re:Next question by shaitand · · Score: 1

      High end video games tend to involve some reasonably sticky problems...

    11. Re:Next question by h4rr4r · · Score: 1

      I did not suggest they did not. Only that they were not the only source of such problems.

      Most video games seem to cheat their way out of lots of problems, something programs used for business cannot often do. A classic example of such cheating is instant hit bullets.

    12. Re:Next question by mwvdlee · · Score: 1

      Regardless, any code that can be written in ~250 lines of C++ (as is the case in the PDF) is not a hard problem.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    13. Re:Next question by jd · · Score: 1

      I dunno. Only a few more boilerplates to go before all programs can be reduced to 10 lines of code or less.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    14. Re:Next question by jd · · Score: 3, Funny

      I dunno. Since it's a comment on Perl, starting with a # would seem to be entirely accurate according to the syntax.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    15. Re:Next question by jd · · Score: 1

      Yes, but the predilections of the users shouldn't enter into it.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    16. Re:Next question by Anonymous Coward · · Score: 0

      Having just come off a project that uses 30,000 lines of Perl the big win is the development speed. Something like 20% the time it would take to have the same code debugged and tested in Java. Ease of modify/debug/test cycle. Ease of writing test scripts in the same language. Ease of taking code and making it into a library.

      The one drawback is probably the TMTOWTDI thing. Every developer has their own style and some are more idiosyncratic than others. One dev wrote C code in Perl, he had never really learned Perl style. Another was determined to use every obscure construct possible - with no comments, of course.

    17. Re:Next question by Anonymous Coward · · Score: 0

      No, the only reason why it does execute fine is because it is a comment

    18. Re:Next question by betterunixthanunix · · Score: 1

      That was for string processing problems. I am not really surprised that Perl did so well -- it is a language for processing strings.

      --
      Palm trees and 8
    19. Re:Next question by epine · · Score: 1

      Stroustrup concedes that the features of C++ might have benefited from a different development path. Particularly the multiple inheritance cart got too far out in front of the generic horse.

      As it stands, there are basically two types of C++ code : code that badly emulates functional programming styles, and code consisting entirely of calls to simple wrappers around extern "C" functions.

      Well, that sure assigns your coordinate in the lumpers and splitters debate.

      So do you think Haida properly belongs to Na-Dene, or are you partial to Na-Dene minus Haida in the newly proposed relationship to Yeniseian?

      I'm personally extremely grateful that there's one language out there whose primary claim to fame is not based on what they decided to vote off the island, even if the road was long and convoluted.

      Much of the language debate devolves on whether your preference is too give a team with real talent a fair shake at solving the very hardest problems, or whether you're more concerned with extracting short-lived revenue streams from the cheapest talent you can find. C++ is the worst of all possible languages in the second scenario.

      Do you admire the guy you sit beside, or detest his incompetence? Choose your language accordingly.

    20. Re:Next question by Anonymous Coward · · Score: 0

      I don't know about C++, but C has the WTF operator.

      !ErrorHasOccured() ??!??! HandleError();

    21. Re:Next question by Daniel_Staal · · Score: 1

      That's a comment.

      --
      'Sensible' is a curse word.
    22. Re:Next question by shutdown+-p+now · · Score: 2

      Unfortunately, C++ remains the only language with a full-featured yet concise RAII, which is its main advantage when compared to C. And templates, while messy, are also extremely efficient in terms of generated code - more so than similar mechanism (generics etc) in pretty much any other language I know of.

    23. Re:Next question by Bucky24 · · Score: 1

      Any perl script executed directly from the command line starts with a comment. True, it will be of the form #! /usr/bin/perl, but a comment nonetheless

      --
      All the world's a CPU, and all the men and women merely AI agents
    24. Re:Next question by Anonymous Coward · · Score: 0

      No it doesn't. It's a comment.

    25. Re:Next question by increment1 · · Score: 2, Informative

      The study cited has several biases in favor of the scripted languages that are acknowledge by the author in the references of your supplied link.

      Primarily:
      - The non-scripted languages (C, C++, Java) were tested under formal conditions in 1997 / 1998 (Java 1.1 I assume), the script programmers wrote their programs at home and self reported their times (and in most cases spent several days thinking about the problem before starting work, time which was not included).
      - The script programmers were told that the programmer effort and elegance of their solution was a criterion, the non-script programmers were only told that the program would be judged based on its correctness (accuracy).
      - The script programmers had immediate access to a hint (to resolve a misread requirement) which was only available to non-script programmers after they failed an acceptance test.
      - The non-script group would have a cost deducted from them each time their program failed an acceptance test, whereas the script group had access to the final acceptance test data.

      Overall, the comparison between the languages does not seem fair, or at least not the comparisons of the scripted and non-scripted languages.

    26. Re:Next question by Anonymous Coward · · Score: 0

      C++ might have developed sanely if they'd introduced it's major features in reverse order, i.e. lambdas way back in 1983, templates a bit later, and class methods only during the last decade.

      It depends what you do with the language, doesn't it? Whether you do mathematical calculations, filters and other composable stuff, or control systems, fault-tolerant systems or other systems software, the needed language features are a function of the needs of the application domain. In 1983 you had also other fashionable languages providing the missing features.

    27. Re:Next question by Jimmy+King · · Score: 1

      That's not really a comment. It tells the shell which program to execute and I believe is not ever seen or processed by the perl interpreter which is why bash scripts start with #!/bin/bash, etc. Although I would guess that if you execute the script with "perl myperlscript", then Perl probably does see that and treat it as a comment.

      If executing with "perl myscript" you also don't have to have the hashbang line there at all.

    28. Re:Next question by benhattman · · Score: 1

      As my professor once said (more or less), "C++: I like how much power it grants me, but I don't think anyone else should be allowed to use it."

    29. Re:Next question by tolkienfan · · Score: 1

      Many hard problems have short concise solutions.

    30. Re:Next question by Anonymous Coward · · Score: 0

      Your guess is wrong in all cases. Instead of attacking me, how about attacking my question? Toy problems prove nothing. I'm talking about problems where even when you're using the right algorithm, you need acess to low-level concurrency primitives, intrinics, the ability to order data in memory to achieve cache-obliviousness and so on and so forth.

    31. Re:Next question by Anonymous Coward · · Score: 0

      Well, http://www.lispworks.com/documentation/HyperSpec/Issues/iss057_w.htm is what I would claim a legitimate claim to fame based on voting off the island...

    32. Re:Next question by Anonymous Coward · · Score: 0

      Templates can only be considered efficient if you exclude macro systems. If we limit ourselves to the languages whose lessons C++ should have taken into account, C++ templates could try to be not so much weaker than Lisp 1.5 macros.

    33. Re:Next question by shutdown+-p+now · · Score: 1

      By "efficient" I specifically meant efficiency of generated code, not power of the facility. Sure, Lisp macros are way more impressive in what they can do, but Lisp is still a dynamically typed language, with all the loss of efficiency that entails (even with heavily optimizing CL compilers).

    34. Re:Next question by maxwell+demon · · Score: 1

      Ah, I see you have a Perl executable named %@$&#@^UGSOWDYRO&F@#L(EGFGP*$TW in your root directory. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    35. Re:Next question by Bucky24 · · Score: 1

      Yeah, it was an attempt to hide my perl binary from anyone else who uses my computer :-)

      --
      All the world's a CPU, and all the men and women merely AI agents
    36. Re:Next question by Anonymous Coward · · Score: 0

      int main(int argc, const char *argv) { printf("Any C, C++ and Objective C program can be written in one line of code"); return 0; }

  3. Trick question? by MrEricSir · · Score: 3, Funny

    I always thought Perl was a randomly generated programming language.

    --
    There's no -1 for "I don't get it."
    1. Re:Trick question? by Anonymous Coward · · Score: 0

      I second that.

    2. Re:Trick question? by PPH · · Score: 4, Funny

      Hence the name: Pathologically Eclectic Rubbish Lister.

      --
      Have gnu, will travel.
    3. Re:Trick question? by Anonymous Coward · · Score: 0

      PERL, the worlds best write-only language.

    4. Re:Trick question? by osu-neko · · Score: 1

      Hence the name: Pathologically Eclectic Rubbish Lister.

      Amen, brother.

      --
      "Convictions are more dangerous enemies of truth than lies."
    5. Re:Trick question? by the+eric+conspiracy · · Score: 1

      Like everything else in Perl, the name is too long.

      Pathological Rubbish would have been more apropos.

    6. Re:Trick question? by X0563511 · · Score: 3, Informative

      Hence the name: Pathologically Eclectic Rubbish Lister.

      Note for the ignorant... that REALLY IS what it stands for!

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    7. Re:Trick question? by AJWM · · Score: 1

      I think APL has the edge there. It went so far as to make up its own non-ASCII symbol set.

      --
      -- Alastair
    8. Re:Trick question? by element-o.p. · · Score: 1

      Hey, hey, hey...that's not fair. Just because some people can't write a readable programs in Perl doesn't mean it can't be done. I mean seriously, what part of...:
      #!/usr/bin/perl

      not exp log srand xor s qq qx xor
      s x x length uc ord and print chr
      ord for qw q join use sub tied qx
      xor eval xor print qq q q xor int
      eval lc q m cos and print chr ord
      for qw y abs ne open tied hex exp
      ref y m xor scalar srand print qq
      q q xor int eval lc qq y sqrt cos
      and print chr ord for qw x printf
      each return local x y or print qq
      s s and eval q s undef or oct xor
      time xor ref print chr int ord lc
      foreach qw y hex alarm chdir kill
      exec return y s gt sin sort split


      ...do you NOT understand?!?!

      FWIW, and all joking aside, I frequently modify Perl scripts that I've written before -- sometimes including scripts that I hadn't touched in years. Even though Perl has a reputation for being difficult to read, I honestly believe that has more to do with programmer style than the language itself. You certainly can write programs that are difficult to maintain, but I'd argue that's not inherent in the language. Perl just allows you to write some rather obfuscated code if you (for some reason) choose to do so. Properly commenting your code will go a long ways towards ensuring readability in Perl...or any other language.

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    9. Re:Trick question? by Anonymous Coward · · Score: 0

      Oh, yeah? Well, you can't even write Malbolge!

    10. Re:Trick question? by fyngyrz · · Score: 1

      I INT(RND(0)*99999)+2 that.

      --
      I've fallen off your lawn, and I can't get up.
    11. Re:Trick question? by steveg · · Score: 1

      Well...

      That's *one* of the things it might stand for, depending on what mood you catch Larry Wall in when you ask him.

      --
      Ignorance killed the cat. Curiosity was framed.
    12. Re:Trick question? by Chris+Burke · · Score: 1

      Note for the ignorant... that REALLY IS what it stands for!

      Heh. Note to the ignorant who want to not be so and don't have a Camel book handy: No it isn't. At least, not exactly.

      The "official" expansion is Practical Extraction and Report Language (the 'a' formerly being part of the acronym when it was briefly called 'Pearl'). "Official" is in quotes because there really isn't an official-official expansion, and Larry Wall wanted the name to inspire a variety of acronym expansions. But this is the one you'll see in the documentation.

      Pathologically Eclectic Rubbish Lister is just one of those other expansions the name inspired, and is often used by Perl aficionados (including Larry Wall, who I think coined it) as a term of endearment for the language and it's eccentricities.

      So you could say "[Pathologically Eclectic Rubbish Lister] really is what it stands for", and be right, but it's in a metaphorical sense similar to how one might say "Ford really means Fix Or Repair Daily" (only in this case it's affectionate instead of insulting).

      --

      The enemies of Democracy are
    13. Re:Trick question? by steveg · · Score: 1

      I agree. My Perl code looks a lot like C, since I was a C programmer when I picked up Perl. It's just the way I approach it. A lot of the Perl-ish syntax I find confusing, but I don't use most of it, so it's not much of a problem. For me, anyway.

      --
      Ignorance killed the cat. Curiosity was framed.
    14. Re:Trick question? by Anonymous Coward · · Score: 0

      No, it isn't. Larry originally named it Pearl after the Parable of the Pearl in the Gospel of Matthew and later shortened it to its current spelling.
      http://en.wikipedia.org/wiki/Perl

    15. Re:Trick question? by Anonymous Coward · · Score: 0

      Note for a fucking moron FSF member: Yeah, we knew already, and we don't care. Perl is an utter pile of shit that should have died years ago, along with Larry Wall and the rest of the turds who use it.

    16. Re:Trick question? by PPH · · Score: 1

      So the name resolution is context sensitive then?

      --
      Have gnu, will travel.
    17. Re:Trick question? by Count+Fenring · · Score: 1

      He said "best write-only language," not "write-only to the greatest degree."

    18. Re:Trick question? by Anonymous Coward · · Score: 0

      The problem with APL is that you can learn to read it if you want because the syntax is very strict.

    19. Re:Trick question? by Anonymous Coward · · Score: 0

      PERL = Practical Extraction and Reporting Language

    20. Re:Trick question? by Mornedhel · · Score: 1

      Note for the uninformed... both "Pathologically Eclectic Rubbish Lister" and "Practical Extraction and Report Language" are backronyms. The language was supposed to be called Pearl, but that turned out to be already taken.

      See here.

      --
      This /.-related sig is a stub. You can help Mornedhel by expanding it.
    21. Re:Trick question? by KlausBreuer · · Score: 1

      Yes and no.

      The official name was supposed to be 'Pearl' (after a quote from the bible, of all things), but a language named PEARL already existed, so it was turned into Perl.

      The later created "Practical Extraction and Report Language" is also officially accepted - as well as, yes, "Pathologically Eclectic Rubbish Lister".

      --
      Free PC version of ChipWits at http://www.breueronline.de/klaus/chipwits/
    22. Re:Trick question? by Anonymous Coward · · Score: 0

      Umh... no...

      http://c2.com/cgi/wiki?PerlIsNotAnAcronym

    23. Re:Trick question? by Anonymous Coward · · Score: 0

      Note for the ignorant.. that it REALLY stands for: Practical Extraction and Report Language

    24. Re:Trick question? by Anonymous Coward · · Score: 0

      Not quite, Wall, simply suggested that as a backronym:

      Perl was originally named "Pearl", after the Parable of the Pearl from the Gospel of Matthew. Larry Wall wanted to give the language a short name with positive connotations; he claims that he considered (and rejected) every three- and four-letter word in the dictionary. He also considered naming it after his wife Gloria. Wall discovered the existing PEARL programming language before Perl's official release and changed the spelling of the name.[27]

      When referring to the language, the name is normally capitalized (Perl) as a proper noun. When referring to the interpreter program itself, the name is often uncapitalized (perl) because most Unix-like file systems are case-sensitive. Before the release of the first edition of Programming Perl, it was common to refer to the language as perl; Randal L. Schwartz, however, capitalized the language's name in the book to make it stand out better when typeset. This case distinction was subsequently documented as canonical.[28]

      There is some contention about the all-caps spelling "PERL", which the documentation declares incorrect[28] and which some core community members consider a sign of outsiders.[29] The name is occasionally backronymed as Practical Extraction and Report Language, which appears at the top of the documentation[27] and in some printed literature.[30] Several backronyms have been suggested as equally canonical, including Wall's own humorous Pathologically Eclectic Rubbish Lister.[31] Indeed, Wall claims that the name was intended to inspire many different expansions.[32]

      http://en.wikipedia.org/wiki/Perl#Name

    25. Re:Trick question? by Anonymous Coward · · Score: 0

      Not informative. Wrong.

    26. Re:Trick question? by X0563511 · · Score: 1

      Jesus Christ, how many of you are going to correct me? Do you even stop to look at replies before spouting off?

      Also, there IS no official expansion. There are several that are "accepted". This is one of them. Eat shit.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    27. Re:Trick question? by uninformedLuddite · · Score: 1

      I always hated Red Dwarf

      --
      The new right fascists are bilingual. They speak English and Bullshit.
  4. Perl Is way better by PerlJedi · · Score: 5, Informative

    I'd have to say PERL is better than a lot of purposefully crafted languages. Its syntax is very forgiving, and there are lots of ways to do most things. Those two components are likely the reason this study came to that conclusion. This in no way means that PERL is not a good language. It does mean that many people can write PERL badly, but many people speak English badly and that doesn't reflect poorly on the language. PERL is, IMO, and should always be: Easy to do, but impossible to do "perfectly". But then I'm not sure that anything can truely be done "perfectly". Things may be done poorly, well, very well, or nearly perfectly, but to claim perfection is to deny the possibility of improvement.

    1. Re:Perl Is way better by Tridus · · Score: 4, Insightful

      "Its syntax is very forgiving, and there are lots of ways to do most things"

      That's probably why it's so commonly known as a write-only language. "Forgiving syntax" in particular usually leads to someone sitting around later trying to figure out WTF is going on.

      It's possible to write bad unreadable code in anything, but it's just so much easier in Perl that I shudder anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience.

      --
      -- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
    2. Re:Perl Is way better by Anonymous Coward · · Score: 0

      You'd think a Perl Jedi would know it's spelled Perl, not PERL.

    3. Re:Perl Is way better by BarfooTheSecond · · Score: 1

      "I shudder anytime anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience."

      Again, this depends on the programmer who wrote the code, not the language.
      It surely can happen that Perl has nothing to forgive..

      Anyway Perl was ment as a "Practical Extraction and Report Language". Imho, in this domain it remains the best!

    4. Re:Perl Is way better by hedwards · · Score: 1

      Sounds more like an issue of EBCAK.

      You can make a program that's illegible, blaming Perl for the incompetence or sloth of the people that are writing the code is hardly a fair. What about all those C programs where code is being run from random other files without concern for organization or maintainability?

    5. Re:Perl Is way better by jedidiah · · Score: 1

      Yeah but wasn't this supposed to be measuring the efforts of "first time users".

      Maintaining someone else's code is an entirely different problem.

      Trying to sort out someone else's code is generally a scary experience across the board. You can make spaghetti out of any language.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    6. Re:Perl Is way better by mvar · · Score: 2

      I use perl for my daily tasks (scripts etc) at work and this "forgiving syntax" has been a time saver.. imho perl is (or should be) just an administrator's tool, nothing more. And yes, its true that reading someone else's code is usually a bad experience and you probably end up writing the program yourself from scratch

    7. Re:Perl Is way better by gold23 · · Score: 5, Insightful

      I would suggest that perhaps Perl is particularly effective in separating good from bad programmers. In other languages, restrictions allow bad programmers to write code that *looks* good.

      But if you see readable, understandable Perl code, you know you've got a keeper.

      --
      Trust not a man who's rich in flax / His morals may be sadly lax
    8. Re:Perl Is way better by h4rr4r · · Score: 2

      use strict;

      Learn it, live it, love it.

    9. Re:Perl Is way better by PCM2 · · Score: 2

      Again, this depends on the programmer who wrote the code, not the language.

      Sure, but all the Perl documentation I've ever seen (Camel Book, etc.) encourages Perl coders to concentrate on the result foremost, even at the expense of the process. Thinking about how to write well-structured code seems to be actively discouraged in the Perl community. Once it works, you're done.

      The Python community were among the first point this out: Sure, there may be "more than one way to do it," as the Perl hackers like to say, but there's probably one good way to do it. If you don't even bother to think about what way that might be, you're going to tend to produce crappy code.

      --
      Breakfast served all day!
    10. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Unless it makes him so happy that he shouts whenever he thinks about it -- be glad he didn't add !!!! after each one.

    11. Re:Perl Is way better by Chemicles · · Score: 1

      I agree, but you could say that about English too. You can try and communicate the same point in many different ways in English properly, but there's definitely a certain sentence structure that'll get your point across more easily with more people than other phrasings. It's not so much the fault of the language so much as it is the speaker's fault.

      Although yes, having had to look at other people's Perl code and the fact that Perl allows this flexibility makes me :(

    12. Re:Perl Is way better by arth1 · · Score: 1

      Comments are supposed to tell you what's going on. In fact, Perl has a built-in self-documentation system that makes it a breeze to document and find the documentation you want.

      You don't maintain perl code by trying to understand it and tweak it. You maintain it by replacing lines or blocks of code with better written code.
      And if you're not man enough to write better code, wtf are you doing trying to maintain it in the first place?

    13. Re:Perl Is way better by Tridus · · Score: 1

      It depends on both. I mentioned specifically that you can write bad unreadable code in anything because it's true.

      But that's like saying you can kill people with a screwdriver. It's true, but it's an awful lot easier with a shotgun. Perl just seems to make it an awful lot easier to "be clever" and come up with something that nobody can understand later. I don't consider that a good thing.

      --
      -- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
    14. Re:Perl Is way better by grcumb · · Score: 3, Insightful

      "Its syntax is very forgiving, and there are lots of ways to do most things"

      That's probably why it's so commonly known as a write-only language. "Forgiving syntax" in particular usually leads to someone sitting around later trying to figure out WTF is going on.

      One could - quite validly - say the same about the English Language.

      Now, I'll grant programming and spoken/written languages don't overlap perfectly with one another. That's why languages like LISP have such elegance; what they're designed to express is something far more abstracted and formalised in nature. It's possible to conceive of a complex structure and accompanying set of behaviours and properties simply by scanning a screenful of LISP, but English is narrative in nature. You don't scan across; you scan from top to bottom.

      It's possible to write bad unreadable code in anything, but it's just so much easier in Perl that I shudder anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience.

      Perl can be difficult to grok, but it can be elegant as well. I've experienced revulsion looking at Perl code before, but never so consistently as with ASP and PHP. These are languages (and I use that term loosely) that simply cannot be made pretty.

      In the right hands, Perl can be as elegant and expressive (and opaque, and efficient) as Shakespearean English. Argue however you like, the same is not true of many other languages. Python has clarity and simplicity. It's truly an engineer's language. LISP, as I've said, is beautiful in the same way architecture can be beautiful: taken as a whole, rather than a story. I didn't understand the appeal of Ruby until I learned that its inventor is Japanese. Then it all became clear. What seemed like awkward, nearly backward syntactical constructions suddenly made sense.

      In other words, horses for courses. But arguing that Perl is not readable in its very nature is like arguing that English in incomprehensible based entirely on watching Jersey Shore.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    15. Re:Perl Is way better by snowgirl · · Score: 1

      I would suggest that perhaps Perl is particularly effective in separating good from bad programmers. In other languages, restrictions allow bad programmers to write code that *looks* good.

      But if you see readable, understandable Perl code, you know you've got a keeper.

      I've looked at Perl like I look at English. It's possible to write really well done English that uses some obscure structures for emphasis, or to increase clarity. It is however more likely that someone will piece together the most incoherent confusing material into an English essay, and you will have difficulty following it.

      Illegible code in Perl is not a fault of the language, but rather a fault of the programmer. Whether the matter of Perl letting people write so hideously is a good or bad thing, it must simply be noted that no one complains about English for allowing people to write horrible messes.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    16. Re:Perl Is way better by anss123 · · Score: 1

      Trying to sort out someone else's code is generally a scary experience across the board. You can make spaghetti out of any language.

      IME it's easier to read Java code, even decompiled java code, than just about anything. C# sharp can be easy too, but a lot more regx use, linq and such ugliness drag it down.

    17. Re:Perl Is way better by arth1 · · Score: 2

      Since it's an acronym, PERL is acceptable too.

      Perl = name of language.
      perl = name of compiler / interpreter
      PERL = acronym for Practical Extension and Report Language

    18. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Yes, Perl separates the good programmers from the bad very effectively. Good programmers won't touch Perl.

    19. Re:Perl Is way better by Anonymous Coward · · Score: 0

      it must simply be noted that no one complains about English

      I gather you've never been to Canada.

    20. Re:Perl Is way better by shaitand · · Score: 1

      I use strict and warnings. There are times when I let warnings go but you should know why they are being generated before assuming they are safe to ignore.

    21. Re:Perl Is way better by eriks · · Score: 5, Insightful

      This!

      Perl is a "beautiful" language -- in the same way some people talk about certain human languages (e.g. romance languages, Russian, or Sanskrit) being beautiful, as opposed to merely functional. Other people will disparage those same languages as being too this, or not enough that... the same kind of debate we see with programming languages, particularly with Perl, which is kind of interesting.

      And for some of those human languages, you'll also hear people lament how horribly some non-native speakers butcher them, perhaps because those non-native speakers are using them merely as a "functional" language, rather than grasping the full depth of expression that is possible.

      This analogy has at least some merit I think, since Perl is a language that was designed "linguistically" at least in some sense, in that it has the same kinds of patterns that natural languages have and is chock full of idioms and expressions, that some programmers (myself included) find not only useful from a functional perspective, but actually enhance the creative process that happens when one writes code. I think part of that is due to Larry Wall's now venerable "Programming Perl" -- which is one of the few truly valuable programming books that's also actually fun to read -- especially if you're one of those people that thinks at least a little like Larry, and enjoys a dry wit.

      Anyway, so yes, I totally agree, programmers that need "restrictions" in a scripting language to have their code be readable are definitely a certain "kind" of programmer. Not that they are better or worse programmers, they just don't embrace the TMTOWTDI philosophy, which is something that the society at-large doesn't generally embrace, so it's no surprise that there seem to be a lot of people that shit all over Perl.

      I've seen (in my own code and in others) truly beautiful and elegant Perl code that reads like a story, and also the "line noise" code people complain about. Which is really all about regular expressions. Some people really love 'em, perhaps a little too much. Though as has been pointed out probably a billion times, there's nothing wrong with one-off throwaway code that looks like line noise, but if you're building a giant system, then your code should be all pretty and commented and generally sociable.

      It's both unfortunate (and I still hope... a mixed-blessing) that Perl 6 has taken so long to come about. In that PHP went and pretty much took over it's niche as a web-development and "glue" language. Though the Perl community is still strong, if small, and I have no doubt that it will remain a living language for a long time to come, if for no other reason than the fact that CPAN is awesome, and there are zillions of lines of code written in Perl that a lot of people depend on every day, and that when Perl6 matures, I think it will enjoy a resurgence, within the Perl community, and perhaps much further, simply because of the simple and powerful philosophies that it encodes.

      Easy things should be easy and hard things possible.

    22. Re:Perl Is way better by mwvdlee · · Score: 1

      But if you see readable, understandable Perl code, you know you've got a keeper.

      Let's see how much of a keeper he still is after being tasked to maintain the unreadable mess produced by all those who weren't keepers.
      I'd much rather have 10 developers write average quality code than 9 producing utter crap and 1 brilliant programmer wasting his time correcting the crap.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    23. Re:Perl Is way better by mwvdlee · · Score: 1

      You maintain it by replacing lines or blocks of code with better written code.

      You don't see a problem with every maintainer replacing code with his own "better" code than what the previous maintainer made simply because he can't be bother to try and figure out what the old code did?

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    24. Re:Perl Is way better by element-o.p. · · Score: 1

      And yes, its true that reading someone else's code is usually a bad experience and you probably end up writing the program yourself from scratch

      Yep, Perl's "forgiving syntax" is a double-edged sword. It allows you to generate a script very quickly to solve the problem you are currently working on, but it also makes it very difficult to maintain someone else's code. Because there are frequently many ways to accomplish the same task in Perl, the subset of Perl syntax and commands that *you* know and use on a daily basis may be quite different than the subset of Perl that *I* know and use on a daily basis. That means when I try to maintain your code, I will spend an inordinate amount of time trying to figure out just exactly what you are doing because your code looks like an entirely different language to me, and vice versa (BTDT, more than once).

      I still think that Perl is not an inherently difficult language in which to program, but the very flexibility that draws people to the language does present some barriers to writing maintainable code. Fortunately, those working together for long enough in a Perl shop will learn the way their coworkers do things, which leads to an expanded understanding of the language, and consequently, less trouble understanding and maintaining other people's code.

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    25. Re:Perl Is way better by professionalfurryele · · Score: 1

      I think you are right to an extent, since I would say the same thing about English.

      English is a confusing language that allows you to construct absurd sentences full of meaningless jibberish, largely irrelevant and far too long when there is a perfectly reasonable way to create a far more cromulent one.

      See, horrid language. In the right hands, can be very expressive, but for the 99% of tasks that are mundane and functional, English is awful. Much prefer German (although it could do with getting rid of the irregular verbs and the gendered nouns). My problem with Perl is we aren't writing sonnets in it, we are writing little scripts. I really don't want something expressive for that.

      But then I'm a bit of a Philistine whose primary appreciation for beauty is derived from strict order. I suspect that is why I like Python so much.

      And to be fair to your example, if I do watch Jersey Shore for more than 3 minutes I begin to feel like English is entirely incomprehensible...

    26. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Amen.

    27. Re:Perl Is way better by element-o.p. · · Score: 1

      Comments are supposed to tell you what's going on. In fact, Perl has a built-in self-documentation system that makes it a breeze to document and find the documentation you want.

      Very true.

      You don't maintain perl code by trying to understand it and tweak it. You maintain it by replacing lines or blocks of code with better written code. And if you're not man enough to write better code, wtf are you doing trying to maintain it in the first place?

      But this...Yeah, I think you may have been smoking those "roll-your-own" cigarettes again. That's either some pretty potent chemicals you've been ingesting there, or you don't really have any experience maintaining code in a production environment.

      First, if you don't understand the code you are working on, how , exactly, are you supposed to know what blocks or lines of code you need to replace? Second, if the software requirements have changed (IME, the most common reason to rewrite working code), then it's not a matter of replacing the other guy's code with "better written code". It's a matter of updating the software to reflect current needs. The old code may have been *perfect* but if it no longer meets the customers' requirements, it needs to be rewritten. Third, "...if you're not man enough to write better code..." -- WTF is that?!?! Did you not know that the person widely credited with being the first programmer was a woman, as was the inventor of the compiler? What chauvinistic B.S.! If it weren't for your low /. ID, I'd guess you were a 13 year-old programmer wannabee full of piss and wind, but obviously you've been hanging out on-line long enough that you should have *some* experience in the real world. I'm just surprised that in that time, you don't have a better grasp on how the IT world really operates <shrug>

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    28. Re:Perl Is way better by drinkypoo · · Score: 1

      Without comments, all is lost.

      Not commenting should be grounds for firing if there is a vague chance that someone might have to fix your code later.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    29. Re:Perl Is way better by arth1 · · Score: 1

      Indeed. Unless it's blindingly obvious what a line of code does, a comment is needed.

      I think there's even a perl module that throws warnings if there aren't comments for each line of code above a certain complexity :)

    30. Re:Perl Is way better by Anonymous Coward · · Score: 0

      If the 1 can keep up with correcting everything the 9 do, I'd opt for the latter situation and then get rid of the 9.

    31. Re:Perl Is way better by Anonymous Coward · · Score: 0

      But if you see readable, understandable Perl code, you know you've got a keeper.

      Let us know when you find one.

    32. Re:Perl Is way better by arth1 · · Score: 1

      You don't see a problem with every maintainer replacing code with his own "better" code than what the previous maintainer made simply because he can't be bother to try and figure out what the old code did?

      That's not the reason why the code is replaced. The code will be replaced because it doesn't do what's expected or needed.
      The comments should explain what the code is intended to do - if the comments aren't there, the code is best completely replaced anyhow.

    33. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Wrong.

      The purpose of the english language is to convey information from person to person. Any communication that fails to do that is not communication. It's simple, if you can't understand it, it isn't english (assuming you're attempting to communicate in english.)

      The purpose of a computer language is to communicate to the "computer" what actions to take. A secondary purpose is to communicate that information to the next reader of the program, this is the most valuable part of a program for most systems! A program in any language can fail the first part, we call those bugs. If a program is successful on the first part and fails the second part many would still call it successful, but they are not concerned with maintenance. Perl pretty much guarantees a failure to the next reader, so in my opinion it is not a "good" programming language for anything serious.

    34. Re:Perl Is way better by arth1 · · Score: 1

      First, if you don't understand the code you are working on, how , exactly, are you supposed to know what blocks or lines of code you need to replace?

      That's why there are comments. And if the comments aren't there, isn't the code best replaced anyhow?

      What chauvinistic B.S.! If it weren't for your low /. ID, I'd guess you were a 13 year-old programmer wannabee full of piss and wind, but obviously you've been hanging out on-line long enough that you should have *some* experience in the real world.

      I'm old enough that I'm allowed to use "man" in a gender neutral way. I could have said "person enough", but that jars my old ears. Let the newer generation use "they" instead of "he/him", but also let the old generation continue to use he/him/man without accusing them of being chauvinistic. We'll be dead soon enough; until then, a little overbearance would be welcome.

    35. Re:Perl Is way better by shutdown+-p+now · · Score: 1

      One thing that I can't get over whenever I have to deal with Perl is the whole idea of scalar vs list context, which is so often implicit and non-obvious, and leads to completely different results for the same expressions. It also leads to very weird syntax decisions, such as the whoe mess with sigils (where you address an element of the array @a as $a[i], whereas $a is a completely different and unrelated variable -- IIRC, this was fixed in Perl 6?).

    36. Re:Perl Is way better by izomiac · · Score: 1

      That's an interesting assessment. Personally, I learned programming through perl scripts, CGI scripts to be precise. First I modified the parts that I understood to accomplish things that were slightly different, then I combined parts of multiple scripts to do something new, then I was able to write CGI scripts from scratch, and eventually I learned how to write essentially anything (e.g. sockets, threads, GUI, etc.). The fact that perl is so flexible made that possible, but I suspect that you are correct in that I must have been learning from skilled programmers as their code was decipherable by a novice. Making something "look easy" is the tell-tale sign of a master.

      Sadly, I, myself, have likely not achieved that level of mastery. If I have to look at someone else's code I usually get frustrated with deciphering their comments so I strip them out and "simplify" the code until it's concise enough to understand what it does at a glance. Given the hodgepodge of techniques I picked up, I can only imagine how "fun" it would be for someone to come after me and try to decipher my own uncommented and highly condensed code. (Actually, maybe that's why my CS teacher often used to write "I have no idea what this does, but I tried it and it works" on my written tests...)

    37. Re:Perl Is way better by Bucky24 · · Score: 1

      Indeed. Unless it's blindingly obvious what a line of code does, a comment is needed.

      Hehe on one of my first projects at my current job my boss told me they stress commenting. So I commented every single line of code. It was a horrible horrible mess. It sometimes can be difficult though to determine what is blindingly obvious at the time of writing-it all makes sense to you while you're writing it down. I find it helpful to go back a few days later, while the idea of what you were trying to do is still fresh, and look it over again. Anything you can't understand at first glance should be given a comment.

      --
      All the world's a CPU, and all the men and women merely AI agents
    38. Re:Perl Is way better by SpaghettiPattern · · Score: 0

      "Its syntax is very forgiving, and there are lots of ways to do most things"

      That's probably why it's so commonly known as a write-only language. "Forgiving syntax" in particular usually leads to someone sitting around later trying to figure out WTF is going on.

      It's possible to write bad unreadable code in anything, but it's just so much easier in Perl that I shudder anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience.

      And then there's the Perl subculture that discards you as incompetent when you sacrifice shortness in favour of maintainability.

      For instance, I once produced a Perl module where every type was put in a separate file. Everything was documented cleanly with cross references, much like you would do in Java. I got sneered at for the amount of files and references. Then there's the name space which is used to spark discussions like "People's Front of Judea" vs. "Judean People's Front."

      I stuck around for a while and then I left the CPAN scene with great relief. I like Larry a lot but the Perl subculture makes me shiver.

      --

      I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
    39. Re:Perl Is way better by Anonymous Coward · · Score: 0

      I'd buy a recent copy of Programming Perl just to see if it got any funnier. I have a wrinkled faded edition from the perl 3 days.

    40. Re:Perl Is way better by arth1 · · Score: 1

      I tend to put one large comment above each small block, explaining what it does. For C, fewer comments are needed (mostly just document the input/output and algorithms), because it's a simple enough language, but for perl and some other languages, I sure TRY to make better notes. Cause sometimes, a week later might be enough that I'm not sure why I did something.

    41. Re:Perl Is way better by griffjon · · Score: 1

      I have been told many times that I write code very perlly.

      --
      Returned Peace Corps IT Volunteer
    42. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Easy things should be easy and hard things possible.

      There's nothing easy about reading or writing collections access, references, or object-oriented idioms in Perl. Functional languages are more readable, and that's saying a lot.

    43. Re:Perl Is way better by jeremywc · · Score: 1

      It's like you just combined every Perl apology I've ever read into one place. ;-)

    44. Re:Perl Is way better by Anonymous Coward · · Score: 0

      I have never written perl with the intent that someone else maintains it, and I would never write Perl with the intent that someone else maintains it. I still find perl to be one of the most valuable skills I have.

      There's no point in building a skyscraper in a forest. Great feats of engineering always sit amidst a sea of ugly mess that provides them with people, money and resources that make their existence useful.

    45. Re:Perl Is way better by savuporo · · Score: 2

      Comments are supposed to tell you what's going on.
      I certainly hope not. Whenever i see comments in C++ or Java code i'm thinking "why did you not write this to be more ovious way in the first place, wtf needs explanations here".
      There a few cases where code needs comments IMO, and class-level and function-level docs are perfectly OK. But comments within source are a sign of
      a) something incredibly clever being done
      b) sloppy design or poorly written code that needs explanation on whats going on
      In 99% of the cases, its the second option

      Good code is self documenting in everything that it does, at least in sane languages

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    46. Re:Perl Is way better by garyebickford · · Score: 1

      the "line noise" code people complain about. Which is really all about regular expressions

      Funny thing - I never liked Perl because it looked like someone sneezed on the screen while eating alphabet soup. But now I use the Perl-Compatible Regular Expressions library (motto: "You have a problem, and decide to solve it with regular expressions - now you have two problems") almost daily. Irony ...

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    47. Re:Perl Is way better by eriks · · Score: 1

      Yes, Perl OO (in Perl5) is hard (for anything non-trivial), ugly, fragile and slow, though it does work, and it's possible to do neat stuff with it. Perl6 will fix all that (except the working and being neat part).

    48. Re:Perl Is way better by eriks · · Score: 1

      Yeah, once you see what you can do with regular expressions, particularly in Perl, I think you're pretty much ruined forever :)

      I so much prefer using them in Perl though, rather than PHP, but I write PHP to pay the bills.

    49. Re:Perl Is way better by JoeMerchant · · Score: 1

      and there are lots of ways to do most things.

      Autocad 14, 2003, etc. had at least 3 ways to do most things, and many of them were subtly unique rather than exactly duplicative. When Autodesk designed Inventor (their "real" 3D package) they enforced a single way of doing things to try to make it easier to learn. They were very different programs for other reasons, but I picked up 3D design in Autocad 2003 in no-time flat, a couple of years later I tied into Inventor and it was about a month before I felt like I was any kind of productive with it. I haven't kept up with the drawing software lately, I wonder if Inventor has grown a few alternate methods yet.

    50. Re:Perl Is way better by Anonymous Coward · · Score: 0

      The funny thing is you say:

      It does mean that many people can write PERL badly, but many people speak English badly and that doesn't reflect poorly on the language.

      Which is a perfect example of poor grammar.

    51. Re:Perl Is way better by Count+Fenring · · Score: 1

      People do complain about that, all the time - just not generally native English speakers. Likewise, it's not a complaint you usually see coming out of thedamian or chromatic ;-)

    52. Re:Perl Is way better by Count+Fenring · · Score: 1

      THIS. They're somewhat better in JS - at least there's an RE literal syntax, but I think it only supports a restricted set of functionality compared to perl (no control of backtracking, etc).

    53. Re:Perl Is way better by Count+Fenring · · Score: 1

      Methinks you'd like forbearance, actually.

    54. Re:Perl Is way better by Required+Snark · · Score: 2, Insightful
      You are dangerous, incompetent and unprofessional. I sincerely hope that you never work on any system that could even remotely threaten anyone's well being, either physical, mental or economic. There is no such thing as self documenting code. That idea was disproved with COBOL. You have no idea what you are talking about.

      Despite some of the ill founded comments in this discussion, natural language is not comparable to computer language. Programming is closer to mathematics then human language. In the same way that mathematical expressions are always combined with text, code requires comments. No one expects to understand mathematics by just looking at equations, and no one should expect to understand code without comments.

      Human language is reflexive in a way that software is not. This means that understanding software requires information that cannot be expressed in code statements. In order to be comprehensible, particularly when multiple people are involved, comments are a necessity. If you don't understand this you should really be in another line of work.

      --
      Why is Snark Required?
    55. Re:Perl Is way better by snowgirl · · Score: 1

      People do complain about that, all the time - just not generally native English speakers. Likewise, it's not a complaint you usually see coming out of thedamian or chromatic ;-)

      I have to correct your use of the em-dash here. First, it's supposed to be an em-dash, and not a hyphen, but second of all, there should be no spaces setting it off. ... ...

      CODING STYLE MATTERS, GODDAMMIT!

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    56. Re:Perl Is way better by Count+Fenring · · Score: 1

      Yeah - in Perl6 sigils are invariant by context, although contexts still exist.

    57. Re:Perl Is way better by Count+Fenring · · Score: 1

      Ha! The spaces are actually somewhat negotiable–it differs between British, American, and Australian usage over various time periods. But you're right–it should by all accounts be an em-dash. I personally find it more legible to put a space after the em-dash, but not before, but I've bowed to your stated preference here.

    58. Re:Perl Is way better by EuclideanSilence · · Score: 1

      Comments are like a higher level language. For the same reason you don't write out explicitly in C what the ASM commands will be, your comments shouldn't reflect exactly or even closely what your code does.

      Comments are for giving a higher level description of the procedure.
      Good comment: "The module sorts a list of integers".
      Bad comment: "This modules goes through a nested pair of loops and reverses each out of place pair of elements of a list to produce a sorted list."

      Commenting every line of code is horribly bad, because 1) it's not maintainable, code changes frequently and 2) it's just rewriting the code a second time, if they couldn't understand it the first time, how are they going to get it the second?

    59. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Nice theory, but when I maintain code I do not want to have to spend 95% of my mental effort trying to work out the semantics of a particular expression in the language, leaving only 5% of my mental capacity to understand if the code is solving the problem correctly.

      Perl and C++ are massive failures in this regard.

      In all of the languages I have programmed in over the last 30 years, Python requires the least mental effort to understand. This leaves nearly all of your mental exertion as a resource to solving the problem at hand.

    60. Re:Perl Is way better by mwvdlee · · Score: 1

      And if it's not blindingly obvious, usually a small comment describing the functional task the block below it is supposed to do, will do.
      All too often do you find people describing what the code does instead of telling the reader what it should be doing.
      If somebody is maintaining your code, chances are that whatever your code does is wrong, describing how it does it wrong doesn't help the maintainer.
      If code requires more detailed comments than that, it's a sign the code is messy.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    61. Re:Perl Is way better by Anonymous Coward · · Score: 0

      I would also suggest that Perl separates good programmers from bad, in that good programmers run away from Perl and find more pleasant ways to spend their time, like chewing glass shards.

    62. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Please; it's Perl, not PERL.

    63. Re:Perl Is way better by Anonymous Coward · · Score: 0

      One could - quite validly - say the same about the English Language.

      That's more a (valid) vindication of English than it is a validation of Perl.

    64. Re:Perl Is way better by Anonymous Coward · · Score: 0

      The way you talk you sound like Larry Wall has been fucking you up the ass for the past ten years. "DERP EASY THINGS SHOULD BE EASY AND HARD THINGS SHOULD LOOK LIKE LINE NOISE DERP DERP." You know what makes that quote utter bullshit, incidentally? Those same things are possible in any other language, too. Imagine that. In Perl they're just more of a pain in the ass than they should be, plain and simple.

      There's nothing "beautiful" about Perl, you're just another fanboy hipster with your head up your own ass about how wonderful some shitty language that should have died years ago is. "They just don't embrace the TMTOWTDI philosophy," yeah sure thing there you fucking nutcase. You're worse than a Scientologist, at least they _know_ they're talking bullshit.

    65. Re:Perl Is way better by Anonymous Coward · · Score: 0

      The Python community were among the first point this out: Sure, there may be "more than one way to do it," as the Perl hackers like to say, but there's probably one good way to do it. If you don't even bother to think about what way that might be, you're going to tend to produce crappy code.

      Or as H.L. Mencken is reported[1] to have said: For every human problem there is an answer which is simple, obvious—and wrong.

      [1] Incorrectly. The actual quote is somewhat less pithy.

    66. Re:Perl Is way better by Anonymous Coward · · Score: 0

      Better to over-comment than under-. After all, you can always strip out comments later if they're really not necessary—but if you come back to uncommented code a year later you'll probably have to invest some effort into figuring out what it does in order to comment it (not to mention changing it to do something else).

    67. Re:Perl Is way better by arth1 · · Score: 1

      All too often do you find people describing what the code does instead of telling the reader what it should be doing.

      Oh, absolutely. When I see comments like "assign foo to bar", I feel like running over to the dev and smash his keyboard with a piece of rebar.

    68. Re:Perl Is way better by Antisyzygy · · Score: 2

      Agreed. I am a PhD mathematics student and I can attest its extremely difficult to understand equations without context and written explanation. Im also a programmer (for my job) and I write my code to be very readable with proper formatting and self-explanatory variables/classes (as much as they can be), however even when I look at my OWN code from the distant past I need comments to sort out the macro-structure of it as well as to explain a complicated line quickly. If you don't remember what some class or function does, its easier to comment that line to briefly explain it rather than have to go look through everything and find it then logically deconstruct it to figure out what it does. Its just bad practice to not comment your code. The more comments the better, and also the more readable it is to other people that may have to use your code in the future. I have had too many times where I get code that takes twice as long to understand what it is doing just because the author didn't comment.

      --
      That brings me to an interesting point, / . is just "the ramblings of socially-inept, technology-literate news-mongers".
    69. Re:Perl Is way better by JesseMcDonald · · Score: 1

      You're both overreacting. The complaint was about comments which describe what the code is doing, which should be perfectly obvious to anyone qualified to be working with it. We agree that "class-level and function-level docs are perfectly OK", and natural language documentation for mathematical expressions comes closer to documentation for software functions than for individual statements. You don't write out an expression and then annotate it with "add variable 'x' to constant 'C' and multiply by factor 'y'"; in code, as in math, the comments should explain why you're doing this, what the result means, and/or what side-effects it causes. If you have to put this inside your functions rather than in a header at the beginning it's probably a sign that your functions are too large, and should be broken into more manageable pieces. Well-chosen variable names and function identifiers can also be considered a form of natural-language annotation, where mathematical expressions tend to use opaque single-letter names requiring separate explanation.

      The more comments the better...

      On the contrary, comments have a cost in readability (more distractions, harder to keep all the useful information on one screen), maintenance (keeping comments synchronized with the code), and accuracy (when you inevitably fail to do so), in addition to the simple cost of writing them. The value of a given comment needs to be high enough to justify the cost. Code filled with low-quality comments, particularly ones which say nothing more than what the code is doing, is worse than code with no comments. However, as you say, a few informative or insightful comments in strategic places can prove invaluable to anyone trying to understand the code—even the original author. :-)

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    70. Re:Perl Is way better by borroff · · Score: 1

      But how do you really feel?

    71. Re:Perl Is way better by Antisyzygy · · Score: 1

      Fair enough. Yes, "The more comments the better" is a bad thing to say. "The more strategic comments the better" perhaps. I only meant that code should have appropriate commenting, not have absolutely no comments at all. It doesn't have to explain basic math or logic operations, but a sufficiently long math equation should have some explanation of what it is doing. For example, in matlab (x'Ax)/(x'x) should probably be commented as "Rayleigh Quotient" or something. At work I use C# for a trading platform and we hardly ever do any math statements that are complicated enough to need comments, but it does come up every once in awhile. Usually we just comment pretty much like you said.

      --
      That brings me to an interesting point, / . is just "the ramblings of socially-inept, technology-literate news-mongers".
    72. Re:Perl Is way better by savuporo · · Score: 1

      Thanks, i've written each of assembler, C and C++ in embedded systems for years. One of my favorite reads that i keep coming back to is Joint Strike Fighter coding guidelines for C++. I also had a decent career in industrial robotics years ago.
      I am a big fan of static code checkers, continuous integration and continuous deployment, selective application of unit testing and designing your systems to be testable at system level as well.
      I also design my APIs and interfaces very carefully, and if there was a degree in applied software modularity i'd probably get it.

      You sir, have completely missed the point.

      A documented system architecture is way, way more important than comments in the code. Class and module level documentation is absolutely necessary, some at function level as well.

      I stand by my statement that 99% of the _INLINE_ comments in the code are useless, or often even harmful. I invariably turn down job applicants who send me test task code with comments like
      // initialization part here
      // multiply by two
      // this function approximates square root

      There absolutely is such a thing as self documenting code.

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    73. Re:Perl Is way better by marcosdumay · · Score: 1

      Only if you don't need to understand the big picture. Java makes a good job making personal stiles (good or bad) less relevant, that point is yours. But it also obfuscates the overall architecture of any system that isn't small.

    74. Re:Perl Is way better by savuporo · · Score: 1

      Pretty much exactly agree with everything you say.

      Massive inline comments almost always serve as excuses for not refactoring the code when some aspect of code quality is going down. Could be either cyclomatic complexity, type cohesion, efferent coupling, number of lines per function, nesting depth, variables per function etc. etc.

      Most of these can be objectively measured, and well scoring code rarely needs additional comments, and its usually this 1% where something incredibly clever or efficient is being done, and should actually be commented

      One thing that code quality metrics cannot measure is the logical naming of the classes, functions, parameters and variables, and that is most frequent offense calling for extra comments. People somehow seem to still think that keeping identifier names short somehow improves the readability of the code, which is bunk.

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    75. Re:Perl Is way better by Mr+Z · · Score: 1

      All depends on the caliber of the comments, too. Comments like this:

      i++; // add one to i

      are just inane. It's as if the programmer worries that they won't understand the base language itself. Comments like this, though:

      i++; // avoid fencepost error: step over separator

      can be worth their weight in gold when diagnosing weird problems.

    76. Re:Perl Is way better by TangoMargarine · · Score: 1

      ...he says as he uses en-dashes.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    77. Re:Perl Is way better by jgrahn · · Score: 1

      I use perl for my daily tasks (scripts etc) at work and this "forgiving syntax" has been a time saver.. imho perl is (or should be) just an administrator's tool, nothing more.

      That's absurd -- why should I as a normal user not use Perl for such daily tasks? Programming is not just for admins and big software development projects.

    78. Re:Perl Is way better by snowgirl · · Score: 1

      Well, slashdot is well-known to mangle unicode, so, I thought that I would write a message that I knew included an em-dash, and then we would know—or at least know as well as anyone could know.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    79. Re:Perl Is way better by juhaz · · Score: 1

      Well, yes, the English language sucks too but you have to cut it some slack - it wasn't designed, it evolved. And evolution tends to come up with crap that's barely good enough to survive.

      The same is not - or at least should not - be true for programming languages.

    80. Re:Perl Is way better by PoopCat · · Score: 0

      Pretty sure any Perl Jedi worthy of the name would know it is correctly capitalised perl or Perl.

    81. Re:Perl Is way better by PoopCat · · Score: 1

      I'm just gonna throw a big fat NO out here to anyone that thinks documenting WHAT code is doing is a good idea (as opposed to WHY it is doing it)*. If you have a comment to explain WHAT the code is doing, and the code gets changed, how many engineers bother to even read the comment, much less change it? Documenting the WHY allows the implementation to change while still passing on the required information - what is the business reason driving this code?

      * - Exceptions are for particularly gnarly code (that can oftentimes serve as a placeholder to get something done - and should generally be of the order of a dozen lines at most) and for code that defies the official word (such as a call to an API whose own documentation states 'X returns an array' but that in reality returns a single datum).

  5. Random? by Anonymous Coward · · Score: 0

    What does "random" really mean in this context? This seems more like just a waste of time.

  6. Novices learning from whom...? by madprof · · Score: 1

    Who taught them Perl? Where did they learn to call subroutines with an ampersand? A Perl 4 manual?

    OK they're novices but even I didn't write loops using C-style loops as a novice Perl coder because I was reading that it was more readable to do for($a..$b) instead.

    1. Re:Novices learning from whom...? by finnw · · Score: 5, Informative

      Yes it was Perl 4, which is one of the flaws in this study.

      --
      Is Betteridge's Law of Headlines Correct?
    2. Re:Novices learning from whom...? by hedwards · · Score: 1

      That's sort of the the point. I'm not a good programmer, but when I code, I tend to use Perl, I focus on making the code legible and typically don't take on much with it. Perl works well with that, but there's plenty of folks that use Perl for things that it's not really intended for and don't have any idea what maintainable code should look like.

      Ultimately GIGO, you need more than a study like this to determine whether or not Perl is better than a randomly generated programming language. Ultimately, I would be extremely surprised if it were generally true as there's plenty of things in any language that are necessary but wouldn't be guaranteed to be randomly generated.

    3. Re:Novices learning from whom...? by Smallpond · · Score: 5, Informative

      "we did not train participants on what each line of syntax actually did in the computer programs. Instead, participants attempted to derive the meaning of the computer code on their own."

      They were not trained. They were just shown code samples with no explanation. The code samples had 1-letter variable names and no comments. The Perl sample uses $_[0} for getting the first sub argument instead of shift, and "for ($i = $a; $i = $b; $i++)" to do a for loop instead of "foreach $i ($a .. $b)", so it is deliberately obfuscated Perl.

    4. Re:Novices learning from whom...? by element-o.p. · · Score: 0

      Ummm...I've been using Perl for close to ten years now in production environments and I both call functions with an ampersand (to clearly delineate that this a function defined with the program itself, as opposed to a built-in Perl function) and use C-style loops. While calling functions with an ampersand may not have any obvious advantages -- it's just the way I learned the language, and I've never had a compelling reason to stop -- I'd argue that C-style loops are a good idea. They are clear and obvious to programmers with a background in C/C++, Java, JavaScript and probably many other languages. for($a...$b)...not so much.

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    5. Re:Novices learning from whom...? by chromatic · · Score: 3, Informative

      While calling functions with an ampersand may not have any obvious advantages...

      It in fact has three disadvantages: it bypasses any prototype coercions, it passes @_ unmodified by default, and it's unidiomatic.

      I'd argue that C-style loops are a good idea...

      All of these fencepost errors I've fixed argue otherwise.

    6. Re:Novices learning from whom...? by Anonymous Coward · · Score: 0

      So we just change the title to "Is Perl 4 Better Than a Randomly Generated Programming Language?" Problem solved.

    7. Re:Novices learning from whom...? by nschubach · · Score: 1

      I mainly program in curly brace languages for a living and I have to say, I wish most of them had collection loops similar to the higher level languages. I end up coding each() methods by hand so I don' t have to deal with for(i = 0; i some.length; ++i) {}

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    8. Re:Novices learning from whom...? by godrik · · Score: 1

      the authors of the original paper should be proud. They manage to get people to react to the issue out of the academic field. This blog post is an obvious reaction. Time will tell if it will change something.

    9. Re:Novices learning from whom...? by Anonymous Coward · · Score: 0

      A shift would have been more intuitive?

    10. Re:Novices learning from whom...? by Anonymous Coward · · Score: 0

      This should not only be modded +5 Awesome, but also linked in the summary as Edit: Study Sucked: "Flawed_Study_Astroturfs_To_Plug_Researcher_s_Language_Not-Yet-To-Market".
      (quote links to parent's post.) /thread.

    11. Re:Novices learning from whom...? by Mjlner · · Score: 2

      A shift would have been more intuitive?

      No, but perhaps a "my ($a,$b,$c) = @_;" would have been. Since I'm a long-time Perl programmer, I can't really speak for the newbie. But the use of the numerous $_[n]-lines is probably unclear. In any case, it is considered bad code, since it is both hard to read and error prone.

      Using a foreach, instead of the C-style for loop, is certainly easier and MUCH closer to the implementation used in Quorum and Randomo. So that, at least, was very poorly thought-out. And Randomo? Is it really random? Or is it really Quorum with a bunch of substitutions made? Just look at the code samples.

      When I had a look at the paper, the first thing I noticed was the use of the ampersand sigil in a function call. This has been considered bad code in Perl since time immemmorial and really goes to show to things:
      * The researchers didn't know the first thing about contemporary Perl and didn't bother to find out, ie. do research.
      * The researchers did nothing to make the Perl code readable, which is paramount for newbies to any language.

      And worst of all, and this is really appalling, they are cherry-picking their methods. Just look at the table and the numbers, then read their analysis. And don't even get me started on the sample-size...

      --
      Lemon curry???
    12. Re:Novices learning from whom...? by Mjlner · · Score: 1

      Ummm...I've been using Perl for close to ten years now in production environments and I both call functions with an ampersand (to clearly delineate that this a function defined with the program itself, as opposed to a built-in Perl function) and use C-style loops.

      Get yourself a copy of "Perl Best Practices" and read it. It will show you the errors of your ways and make you write better and more readable code.

      --
      Lemon curry???
    13. Re:Novices learning from whom...? by MadKeithV · · Score: 2

      The Perl sample uses $_[0} for getting the first sub argument instead of shift, and "for ($i = $a; $i = $b; $i++)" to do a for loop instead of "foreach $i ($a .. $b)", so it is deliberately obfuscated Perl.

      As someone with a grand total sum of one hour of Perl experience about 10 years ago, that does not look like deliberately obfuscated Perl, but Perl written by a C programmer.
      I'm willing to bet I would understand this "obfuscated" code a lot better than your idea of non-obfuscated Perl code. That doesn't mean I think the "obfuscated" code is better - just that it's a better match for the way my mind has been twisted by the particular programming language I use most often.
      That's also why this study is somewhat interesting - it starts from people without any prior experience in programming, just your average human experience. And the language based on "intuitive" concepts (i.e. concepts from general human experience instead of programming-language specific concepts) did better. Is that surprising? Not very, except for providing a first insight that some concepts may in fact be more intuitive than others and thus more easy to learn. Does that mean in the long run these concepts will also be the most productive? I cannot say for sure, but I had a lot of fun trying to bend my mind around Lisp, and noticed sudden leaps in producivity when things "clicked", so my grand total of one anecdote tends to make be believe that some non-intuitive concepts may be a lot more productive than the intuitive concepts.

  7. And this is relevant because? by Anonymous Coward · · Score: 0

    I would think something on the lines of 'what can quorum or randomo do that perl can't' along with the ease of writing hello worlds (as a small side note) would be marginally more interesting.

    1. Re:And this is relevant because? by Anonymous Coward · · Score: 0

      'what can quorum or randomo do that perl can't'

      Nothing. They're both Turing-complete, and every programmer knows you can write your own Lisp implementation in any Turing-complete language, and then do what you want from there. (Or if you're a language fanboy, write your favored language in Lisp macros, and then do what you want. Sysadmins may consider writing C, coding some flavor of bourne-compatible shell, and then writing a small script to do what they want.)

      Mathematicians even claim you can write your program directly in any Turing-complete language, but it's not clear why you would bother.

  8. Not so fast.... by Ardeaem · · Score: 4, Informative

    They claim that Perl is not significantly better than Randomo, but that's just due to the test they chose. Looking at their figure, Perl programmers outperformed Randomo programmers in 6/6 tasks (that is, their means were greater). Using a simple sign test on the differences between the means, the two tailed p value is about 0.03, and the one-tailed p value (I think we're justified here having having a directional hypothesis...) is about 0.015. Both of these numbers are less than 0.05; we are justified in saying that Perl programmers performed significantly better than Randomo programmers, in spite of what the paper says.

    1. Re:Not so fast.... by Daniel+Dvorkin · · Score: 1

      Using a simple sign test on the differences between the means

      Sign tests are for differences between medians, not differences between means. So while the median for Perl was significantly better than for Randomo, the mean was not. Which of these results you accept depends on whether you consider the mean or median more useful for this kind of test ... and which result you prefer to see, of course.

      (And yes, I know what you meant by the phrasing you used, but it's pretty obfuscatory. Are you a Perl programmer, by any chance?)

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    2. Re:Not so fast.... by Anonymous Coward · · Score: 0

      Careful, Zed Shaw is going to find you while you're sleeping and hit you with a statistics textbook.

      see Programmers Need To Learn Statistics Or I Will Kill Them All

    3. Re:Not so fast.... by Anonymous Coward · · Score: 0

      They claim that Perl is not significantly better than Randomo, but that's just due to the test they chose. Looking at their figure, Perl programmers outperformed Randomo programmers in 6/6 tasks (that is, their means were greater). Using a simple sign test on the differences between the means, the two tailed p value is about 0.03, and the one-tailed p value (I think we're justified here having having a directional hypothesis...) is about 0.015. Both of these numbers are less than 0.05; we are justified in saying that Perl programmers performed significantly better than Randomo programmers, in spite of what the paper says.

      This is incorrect. They used a repeated measures design. Sign tests don't take into account the fact that participants did multiple tasks, which is why they used a repeated measures anova test (which does) + post-hoc. Your post sounds like wisdom, but is wrong.

    4. Re:Not so fast.... by retchdog · · Score: 1

      who cares? the distributions of scores between the two languages differ with p=0.015, and so it's pretty clear what 6/6 in favor of perl means.

      if you want to compensate for having performed two tests, just double the p-value (bonferroni correction), which is conservative. you're still <5%.

      the real criticism here would be that the six tests are not actually independent of each other, which throws any simple p-value straight out the window, but what did anyone really expect from southern illinois university?

      --
      "They were pure niggers." – Noam Chomsky
    5. Re:Not so fast.... by Ardeaem · · Score: 1

      Yeah, if it was repeated measures that does threaten the sign test. I can't easily check the paper again on this phone. Regardless, they are arguing from a null result, with a low power test, and they misinterpret the p value.

    6. Re:Not so fast.... by Rich0 · · Score: 1

      Arguably you can't conclude that again unless you re-run the study and perform the same analysis.

      You can't decide how to analyze the data AFTER you collect it. That leads to all kinds of bias.

  9. What are they trying to prove? by medv4380 · · Score: 2

    Are they telling me that Quorum is better then a randomly generated language at teaching and that Perl makes bad programmers? This sounds more like someone setting up a study and trying to rig it so that their horse (quorum) gets taught in the class room. Personally I stick Perl in the same bucket as VB and most scripts. They may have their uses but new programmers need to be beaten with languages like C and C++ first. Otherwise they learn bad habits. Perl only starts getting good when you use strict so that it has been given permission to beat the programmer for any little mistake.

    1. Re:What are they trying to prove? by tepples · · Score: 1

      What bad habits would one learn from, say, Python?

    2. Re:What are they trying to prove? by h4rr4r · · Score: 1

      That whitespace is a good way to delimit blocks.

    3. Re:What are they trying to prove? by MagikSlinger · · Score: 1

      What bad habits would one learn from, say, Python?

      Indentation as syntax.

      --
      The bitter lessons of a veteran coder: http://bitterprogrammer.blogspot.com
    4. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Not putting semi colons at the end of lines :(

    5. Re:What are they trying to prove? by muon-catalyzed · · Score: 1

      There are two types of programming languages. Those created to solve an urgent need, to make things possible, better, cleared and more robust. And then there are the other type of languages, those that were created to promote the author, to gain recognition, to sell his books, manuals and help him attain better employment or academic position, Wikipedia entry etc. These junk languages usually sport some gimmicks like mascots, academic syntax (bad/random syntax), performance issues and intended incompatibilities. Successfull creators of these are often seen as 'evangelists' at certain corporations.

    6. Re:What are they trying to prove? by Hentes · · Score: 1

      Indentation is a good habit even if it's not necessary in a language's syntax.

    7. Re:What are they trying to prove? by medv4380 · · Score: 1

      Indentation is a good habit even if it's not necessary in a language's syntax.

      Too much work I'm lazy. Right click auto format puts in all the appropriate indents.

    8. Re:What are they trying to prove? by h4rr4r · · Score: 1

      Sure but confusing it with syntax is a stupid idea.

    9. Re:What are they trying to prove? by Hentes · · Score: 1

      Exactly like a Python IDE.

    10. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      If you are a competent programmer you'll indent your code consistently regardless of the language. So the left braces, right braces and semi colons serve only the purpose of making your compiler give you pages and pages of errors when you forget a brace. There is no confusion, there is only a superior language design. Adding hundreds of unnecessary braces and semi colons each day isn't a big deal, but significant white space is the better option.

    11. Re:What are they trying to prove? by Princeofcups · · Score: 1

      If you are a competent programmer you'll indent your code consistently regardless of the language. So the left braces, right braces and semi colons serve only the purpose of making your compiler give you pages and pages of errors when you forget a brace. There is no confusion, there is only a superior language design. Adding hundreds of unnecessary braces and semi colons each day isn't a big deal, but significant white space is the better option.

      Jesus Christ, Fortran 66 would be your wet dream then. What's old is new again, or learn from your mistakes. Hmmm.

      --
      The only thing worse than a Democrat is a Republican.
    12. Re:What are they trying to prove? by medv4380 · · Score: 1

      All modern IDE's have auto format of tabs. I don't have the time to re-indent all my lines when I add a logical block like ohh this should be in an if block to avoid this one off case that's been crashing my app.

    13. Re:What are they trying to prove? by element-o.p. · · Score: 1

      Agreed, and that's why I'm religious with whitespace whether I'm writing Perl, Python, HTML, JavaScript, Bash or any other scripting/programming/formatting language. However, I've seen Python break when a programmer pulls it into an editor that automatically converts tabs to spaces (or vice versa) while trying to maintain code that someone (else?) originally wrote in a different editor because now your script is no longer properly indented...even though it looks identical to the human eye (because most editors that I've used don't visually differentiate between tabs and spaces).

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    14. Re:What are they trying to prove? by Requiem18th · · Score: 1

      And I find writing end end end end too much work too and a cascade of

                                      }
                              }
                      }
              }
      }

      Is not much better either, specially when you factor in the semicolon cancer. What year are you writing form that you don't have autoindenting editor?

      --
      But... the future refused to change.
    15. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      It is much better, just try % in command mode over a brace.

    16. Re:What are they trying to prove? by nschubach · · Score: 1

      Excessive ending block braces tell me there's probably a good chance of refactoring some code.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    17. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Have you ever read code where the blocks aren't indented? It's pretty bad. I'm curious why you think otherwise?

    18. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      "I don't have time to manage curly braces." Don't you understand what a stupid sort of statement that is?

      It's not like you'll pull a muscle hitting the tab key once. Use any editor with soft tabs (e.g. vim or emacs or nano or gedit or eclipse, not notepad.exe) and it is absolutely not an issue.

      If it were such an issue, then nobody would get anything productive done in Python, but they do. So whose problem is it? It's your problem, not Python's.

    19. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      It is in fact an excellent way. The very best, actually. It removes the fugly from the syntax. Hence Python is beautiful, and Perl is the maggot-infested corpse of a plague victim. Bubbly sores and all.

    20. Re:What are they trying to prove? by GuldKalle · · Score: 2

      First, a question: Why is it such a bad thing to use whitespace as syntax?

      Second, the act of indenting your code is not in itself a bad thing (when we talk "normal" languages like C), so why is it suddenly a bad habit when they pick it up in Python?

      --
      What?
    21. Re:What are they trying to prove? by Count+Fenring · · Score: 1

      They also make it trivial to correctly re-indent code to the proper depth when you copy and paste. They also let you combine short, hyper-simplistic statements on one line, saving screen space. Speaking of which, they also let you know whether or not you've left a block in situations where one or more blank lines are at the bottom of the viewport.

    22. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Intriguing question - pedantic response.

      Is it your point that there are no bad habits to be learned from Python?

    23. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Copy and paste some Python code into a mail, skype or your preferred IM, and you will see

    24. Re:What are they trying to prove? by voidphoenix · · Score: 1

      Indentation is good because it makes the code easier to read for humans, which is why auto-indent tools are such a godsend. Making indentation/whitespace significant (1) reduces the reliability of the auto-indent tools; (2) introduces a new source of hard-to-find bugs. Editors can (and do) mangle whitespace (tabspaces), which means the simple act of loading code into a text editor can invisibly change semantic components. Python's semantic whitespace also makes it impossible to do sanity checks involving matching opening and closing delimiters.

    25. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      It is. It's not correct to call whitespace a block delimiter, by the way, every line starts with a number of spaces corresponding with its block nesting level.

      In the years that I've been using Python I haven't had a single issue with it. I just keep enjoying the lack of the kind of visual clutter in many other languages that I've always percieved as a distraction. All the stupid discussions about where exactlty you should put the accolades are a clear indication that they get in people's way.

      Why do you use indentation in languages that don't need it to compile? Because it corresponds with how humans recognise structure. Every programming language is a bridge between what a human can oversee and what a CPU can process. Making indentation meaningful puts the balance a bit closer to the human. That's good, it helps to make a better bridge.

      If some language theory say it's wrong to give meaning to whitespace to indicate blocks (I've seen that argument several times) I would say that when things that work just fine are in conflict with a theory then there may be something wrong with the theory. If there are practical objections based on things you do with your editor then they can be solved by changing one or two habits. You do need to overcome religious wars about tabs vs spaces for indentation, and just use the 4 spaces per indentation level that PEP 8 recommends.

      It isn't a good fit for every situation, I want to have explicit delimiters in a template language, eg. for HTML. But if that becomes a mess without explicit block delimiters it's because mixing languages in that manner is messy anyway.

    26. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Python did make the initial mistake of allowing both tabs and spaces. The official recommendation is to use 4 spaces per indentation level.

      I've programmed in Python for several years now and haven't had a need for auto-indent tools one single time. You need them with other languages only because you have two potentially conflicting ways to mark blocks, one for humans and one for the compiler. Eliminate that source of conflict and you don't need auto-indent tools at all. You just need an editor that can change indentation of selected blocks easily.

    27. Re:What are they trying to prove? by Anonymous Coward · · Score: 0

      Perhaps you should complain about the stupid limitations those tools have. Preserving indentation should not be difficult. The solution in email is simple, by the way: use an attachment, or don't use HTML formatted mail.

      It keeps amazing me how, with all the technological accomplishments we have at our fingertips, the internet is full of discussion sites that don't properly support threads and communication software that can't even process plain text without damaging it. We keep replacing things that work with crap that does something new and fancy but messes up basic things that used to work fine.

      The problem is not with the message that is being corrupted, the problem is with the software that corrupts it.

  10. SIU is a joke by Anonymous Coward · · Score: 0

    I went to SIU GREAT party school...... Their CS dept, however, is a complete JOKE...

  11. Quorum looks a lot like Pascal by tepples · · Score: 1

    My guess is that Cobol would beat any of the three - it is designed from the ground up to be readable.

    So are Pascal and Python. In fact, Quorum looked a lot like Pascal from what I saw in the PDF.

    1. Re:Quorum looks a lot like Pascal by h4rr4r · · Score: 4, Insightful

      Languages that consider whitespace need to die.

    2. Re:Quorum looks a lot like Pascal by SilverHatHacker · · Score: 0

      Languages which require gratuitous punctuation marks to delimit a loop that should already be indented for readability's sake need to die, IMO.

      --
      Funny may not give karma, but +5 Informative never made anyone snort coffee out their nose.
    3. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Languagesthatconsiderwhitespaceneedtodie.

      FTFY :-)

      (I'm guessing you meant that languages that consider whitespace as anything other than a token separator need to die)

    4. Re:Quorum looks a lot like Pascal by narcc · · Score: 3, Insightful

      Well said.

      If you want your code properly indented, just indent it. It's like the Python apologists are incapable of formatting their code properly unless the language forces its particular version of "properly" on you.

      Before the trolls fire back: In the case of code written by others, run it through a pretty-printer. Problem solved. Oh, as a bonus, you can use that same tool to format code the way you prefer, and switch it back to whatever style your company requires at the press of a button. Why is this a bad thing?

    5. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 1

      Any language where:

      vs

      means something completely different, is not one I intend to use.
      If you want to enforce readability, use any one of a number of lint tools out there.

      What particularly annoys me is that it isn't even optional. The arrogance of it. Python is so wedded to the idea that TMTOWTDI is a stupid idea, and it really should be. "There Is only Guido's Way To Do It" (sorry, s/Guido/obvious/) that they won't even *consider* supporting an alternate parsing mode.
      Any language where bugs can be invisible on a printout or through accidental mangling of a text editor or e-mail copy/paste is a dumb idea.

      I love how a beginner Python programmer *accidentally* setup an infinite loop that killed our app, when trying to interact with it.
      That's when he wrote his own wrapper to have sane nesting in Python.

      http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29
      ^^^^

      Python. Repeating the mistakes of Makefiles.

    6. Re:Quorum looks a lot like Pascal by h4rr4r · · Score: 1

      I had no trouble parsing that :)

      But, yes you are correct.

    7. Re:Quorum looks a lot like Pascal by MoNsTeR · · Score: 5, Insightful

      If those punctuation marks (or keywords) make the code more readable, then they're not gratuitous are they?  I, for one, find brace-less languages fantastically hard to read, Python especially.

    8. Re:Quorum looks a lot like Pascal by X0563511 · · Score: 0

      Get a real text editor. They tend to have some way of visualizing whitespace.

      Mine, for instance, CLEARLY distinguishes tabs from spaces. Interestingly enough using a monospaced font is helpful as well.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    9. Re:Quorum looks a lot like Pascal by Radres · · Score: 1

      Because in practice, the automated code cleaner results in almost every line of code in the file to have a difference highlighted by my company's source code repository diff generator. This obfuscates the true nature of the change to the logic in the code I am making in order to fix a bug or implement a feature. In turn, that makes it harder for people responsible for maintaining the code to determine what exactly changed from version to version.

    10. Re:Quorum looks a lot like Pascal by smbarbour · · Score: 1

      Quorum looked a lot like BASIC to me. Only the keywords were different. The headline for the article is horrible (as usual). The headline (and summary) neglect to mention that this test was given to people who had no experience in programming.

      We compared novices that were programming for the first time using each of these languages, testing how accurately they could write simple programs using common program constructs (e.g., loops, conditionals, functions, variables, parameters).

      My takeaway from this "research" is that Perl is not a good language for beginners. If you already know the general concepts of programming, Perl is fairly easy to pick up.

    11. Re:Quorum looks a lot like Pascal by h4rr4r · · Score: 1

      Way to misunderstand what was being said on purpose. You must be a fun guy at parties.

    12. Re:Quorum looks a lot like Pascal by AJWM · · Score: 4, Interesting

      Fortran (at least, IV and earlier) totally ignored white space, even in the middle of an identifier. Of course, this led to problems like

      DO 10 I = 1.10

      meaning "assign the floating point number 1.10 to variable DO10I", when the programmer meant to type

      DO 10 I = 1,10

      meaning "loop from here to label 10 varying I from 1 to 10".

      An error something like this caused the Mariner II probe to Venus to go off course at launch and the Range Safety Officer hit the destruct.

      --
      -- Alastair
    13. Re:Quorum looks a lot like Pascal by DragonWriter · · Score: 2, Insightful

      Languages that consider whitespace need to die.

      Most languages consider whitespace. In most programming languages where both of the following are valid, they will have different semantics:

      1: foo bar
      2: foobar

      Quite a lot of languages even distinguish between different types of whitespace, e.g., C where the following two constructs are different, despite differing only in which particular kind of whitespace:

      1:
      foo(); //
      bar();

      2:
      foo(); // bar();

      Python may be unusual in which differences in whitespace it considers significant, but not in that it considers whitespace significant. People need to stop confusing the issue.

    14. Re:Quorum looks a lot like Pascal by Smallpond · · Score: 1

      I remember monospaced fonts. Punch cards with FORTRAN used them. Remington typewriters used them too.

    15. Re:Quorum looks a lot like Pascal by mwvdlee · · Score: 1

      Get a language that can be programmed using with any text editor.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    16. Re:Quorum looks a lot like Pascal by jd · · Score: 1

      That rules out any whose syntax is so complex that you NEED some form of RAD tool to be able to write in it. ie: 98% of all modern languages.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    17. Re:Quorum looks a lot like Pascal by jd · · Score: 3, Funny

      Fortran is interesting, theologically - it considers God to be real unless declared integer.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    18. Re:Quorum looks a lot like Pascal by jd · · Score: 1

      I regard Occam-Pi to be superior to any other Pascal variant, especially for readability and provability, but it is incredibly fussy over whitespace.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    19. Re:Quorum looks a lot like Pascal by gestalt_n_pepper · · Score: 1

      So, I guess the Whitespace language (http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29) isn't for you then, eh?

      --
      Please do not read this sig. Thank you.
    20. Re:Quorum looks a lot like Pascal by Chris+Burke · · Score: 4, Interesting

      If those punctuation marks (or keywords) make the code more readable, then they're not gratuitous are they? I, for one, find brace-less languages fantastically hard to read, Python especially.

      I LUUUUURV Python so much that if it was legal I would marry it, but I completely agree. Curly braces to denote block starts and stops make the code easier to read and manage. I should not have to wonder whether a function or block continues past the bottom of the current screen's worth of code when it ends with a few lines of whitespace because I have to know the indentation level of the next line of code to know if it's in a different block context than the last line of code on the current page. I also should never have to wonder if I re-indented code correctly when cut/pasting or adding/removing a level of block nesting.

      I don't care if Python wants to keep the indentation requirements. Forcing the code of awful programmers to be more readable in this way is a good thing. Forcing all code to be less readable in another way is a bad trade-off. Just add in the damn braces! Then I can use tools to auto-indent for additional readability.

      --

      The enemies of Democracy are
    21. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Your 2nd example doesn't mean what you think it to mean.

      foo(); bar() would work, the white space does not mean anything. Your second would technically be // \n in which the comment is ended in parsing by the \n character, this is a feature that utilizes the end of line character. If you did:

      foo(); /* */ bar(); the functionality would ignore the white space. the whitespace you claim to have an effect in 2 is only relegated to the comment in parsing, it needs some knowledge of end, and in this case the definition is the end of line character.

    22. Re:Quorum looks a lot like Pascal by rthille · · Score: 2

      I've always felt that version control systems should store syntax trees, but have never had the time to do the work to do that.

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    23. Re:Quorum looks a lot like Pascal by iamwahoo2 · · Score: 1

      There is no way that curly brackets make code more easily to read than perfect indentation. It is stands to reason that as your eyes take in a new piece of code and track from right to left across a body of text, indentation levels stand out and make the separation of code very apparent.

    24. Re:Quorum looks a lot like Pascal by PwnzerDragoon · · Score: 1

      Both those lines mean exactly the same in Python - absolutely nothing. Whitespace-only lines are ignored.

    25. Re:Quorum looks a lot like Pascal by uniquename72 · · Score: 1

      I had no trouble parsing that :)

      How about "expertsexchange" or "therapistfinder"?

    26. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      To alter one of Quido van Rossum's quotes slightly: "If you don't like how Python considers whitespace, make your own programming language."

    27. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 4, Insightful

      Personally, I find that curly braces make code easier to read on top of perfect indentation. In truth, though, it's not so much the braces, as it is the nearly-empty lines of code that are spend to put those braces (note: this specifically applies to ANSI-style brace layout only, not K&R style). It creates a kind of a visual box, clearly delimited, with body of the block in it - more so than plain indentation does by itself.

      That said, I wouldn't call Python "fantastically hard to read", quite the opposite - it tends to be one of the easiest languages to read. Not because of indentation, but because its basic syntax is rather clean.

    28. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 2

      No-one is saying that Python is good because it forces you to indent. Quite the opposite: all sane people indent their code anyway, whatever the language, so why not use that to indicate program structure?

    29. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      \n is whitespace by all definitions that I'm aware of.

    30. Re:Quorum looks a lot like Pascal by dgatwood · · Score: 1

      (I'm guessing you meant that languages that consider whitespace as anything other than a token separator need to die)

      I would think it should be corrected to "Languages that consider the quantity of whitespace to be syntactically significant need to die." Whitespace can be used as more than a token separator, particularly in strings and comments. Further, it is reasonable to distinguish between different visually distinct types of whitespace in some cases—treating a line break differently than a space, for example. However, the difference between one space and two should never result in a change in behavior, nor should the difference between two types of whitespace that both fall within the same directional class ever be taken into account (space versus tab, newline versus carriage return, etc.).

      Curly braces also make it a heck of a lot easier to copy (or cut) and paste chunks of code. Just go to the opening curly brace and d%, and now you've just cut the entire block (ignoring any brace matching problems caused by braces in comments or strings). It's not nearly that easy without delimiters.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    31. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      I think what the author was trying to say was that it's a bad idea for languages to utilize white-space that is indistinguishable from other white-space (of course this isn't limited to white-space - just visible characters tend to be easily distinguishable) & to have whitespace affect code structure.

      Newline is a special type of whitespace since it's (usually) visibly distinguishable from spaces or tabs, so some languages treat it differently.

      You're comment about the // example is actually proving the opposite point. It shows the danger of using whitespace as implicit delineation of code structure.

      Aside from // in C, all forms of whitespace behave the same way. You built up a strawman & tore it down. What the OP was trying to state I think is that languages that consider white-space as anything other than tokenization separators (i.e. do not affect code-flow & you can replace all forms of white-space with a space & the code is unaffected) is a bad idea.

    32. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Thankfully,Ihaveliberatedmyselffromconsideringwhitespaces.

    33. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      You're going to love this: http://compsoc.dur.ac.uk/whitespace/

    34. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      ...
      I'm going to hope that sheer inane pedantry was a joke.

    35. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Python is a language which is meant to be easy to pick up even for people who have never programmed before. The indention scheme is not there to make your code look pretty. It's there to make code function the way it looks.

    36. Re:Quorum looks a lot like Pascal by nschubach · · Score: 2

      Because not everyone uses the same indentation as everyone else. If indentation rules need to be worked out before starting a project, you're wasting more time than a language where indentation has no meaning.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    37. Re:Quorum looks a lot like Pascal by lgw · · Score: 1

      The problem is: your curly braces syle is wrong, you heretic - only fools put curly braces there - that other way is the only true way. Python ended the braces style holy wars forever, which at a large company is a big thing.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    38. Re:Quorum looks a lot like Pascal by lgw · · Score: 2

      Really, Python's problem is that both spaces and tabs are legal - if the language required one or the other, it would be fine, modulo subjective readibility arguments about braces.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    39. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Python fanboys need to stop trolling (and as the other AC pointed out: beating up strawmen) when regular programmers complain about whitespace.

      When regular programmers say python sucks because it's whitespace sensitive, we're talking about the fact that indentation matters. This is a big issue because snippets cannot be reliably copied and pasted through a whitespace-ignorant medium like most forums.

      On the other hand, bracket delimited languages can be copied and pasted reliably without loss of functionality, and they can also be re-indented for readability if someone screws up the whitespace in the copy/paste.

    40. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      main(){int foo=23,bar=42;return printf("%d\n",foo+++bar);}

    41. Re:Quorum looks a lot like Pascal by mooingyak · · Score: 1

      Make separate commits. Pretty it up, commit. Make your logical changes, commit.

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    42. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 1

      Most languages consider whitespace.

      Yes, but it should only be used when tokenizing. The idea of using it to indicate scope is absurd.

      e.g., C where the following two constructs are different, despite differing only in which particular kind of whitespace:

      1:
      foo(); //
      bar();

      2:
      foo(); // bar();

      Comments in C are written /* text */. The slash-slash-to-newline comments are from C++.

    43. Re:Quorum looks a lot like Pascal by narcc · · Score: 1

      No-one is saying that Python is good because it forces you to indent.

      Believe it or not, I've seen that claim made in several Python related threads.

      Quite the opposite: all sane people indent their code anyway,

      I agree.

      whatever the language, so why not use that to indicate program structure?

      There are problems with it. Aside from various non-Python-aware code editors ruining perfectly valid programs by doing stupid things like replacing tabs with spaces on save, even the best Python-aware editors can choke when you move blocks of code around -- this is especially problematic when the indentation level changes. Punctuation removes any and all ambiguity in those cases.

    44. Re:Quorum looks a lot like Pascal by nessus42 · · Score: 1

      Really, Python's problem is that both spaces and tabs are legal

      Set your tab width to 8 spaces, you damn hippy!

      |>ouglas

    45. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      Because not everyone uses the same indentation as everyone else.

      It's not a problem for Python, provided that indentation rules are consistent within a single block (e.g. a method). And I've yet to see a codebase where it was not consistent at least on file level.

    46. Re:Quorum looks a lot like Pascal by Lennie · · Score: 1

      With Javascript you also can't choose. "braces on the right" is only way that works the same in all situations.

      --
      New things are always on the horizon
    47. Re:Quorum looks a lot like Pascal by KingAlanI · · Score: 1

      and then people are going to start marrying the the tools of their profession... :P

      However, back on topic, if the problem is with reading your own Python code, could you add the braces as comments? or is the problem with other peoples' Python code?

      --
      I listen to both RIAA and non-RIAA stuff if I like the music, tangential business/politics nonwithstanding.
    48. Re:Quorum looks a lot like Pascal by Chris+Burke · · Score: 1

      The problem is: your curly braces syle is wrong, you heretic - only fools put curly braces there - that other way is the only true way. Python ended the braces style holy wars forever, which at a large company is a big thing.

      Wow. They've eliminated one of the thousands of coding-style holy wars that go on at companies stuffed with jackasses who can't compromise on some reasonable coding guidelines (and no, I'm not saying this is uncommon). I'm sure the people who couldn't agree on curly brace location will have no problem agreeing on spaces-per-indention-level or the ever popular tabs-vs-spaces or how to format multi-line conditionals etc etc etc.

      This is similar to the "improves readability" argument for enforcing indentation in that it tackles only a tiny aspect of the problem. At least in terms of coding style holy wars it doesn't actually make the problem worse to a greater degree than it helps. I still don't see it as a good reason for losing braces.

      --

      The enemies of Democracy are
    49. Re:Quorum looks a lot like Pascal by tepples · · Score: 1

      Aside from various non-Python-aware code editors ruining perfectly valid programs by doing stupid things like replacing tabs with spaces on save

      Then don't use tabs. Use 4 spaces like everyone else, and no problems will happen.

      even the best Python-aware editors can choke when you move blocks of code around -- this is especially problematic when the indentation level changes.

      IDLE has Ctrl+[ and Ctrl+] to decrease or increase the selected lines' indentation.

    50. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      even the best Python-aware editors can choke when you move blocks of code around -- this is especially problematic when the indentation level changes. Punctuation removes any and all ambiguity in those cases.

      That's a good point, actually - I thought about it, and realized that I actually use this very feature daily when editing C# code in VS (it automatically re-indents pasted code according to the surrounding {}s).

    51. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      probably he meant something like languages that consider indentation need to die.
      Actually whitespace should only be used to delimit tokens when there is no other way for the lexer to split correctly into tokens. imho
      mostly this means just saying no to allowing special characters like ( { [ etc in names.
      This is something that annoys me in bash
      why do I need to put a space after [[ for it to work?

    52. Re:Quorum looks a lot like Pascal by History's+Coming+To · · Score: 1

      personally,Iprefer"punctuation"to,you-know,assist'readability'.
      1:i
      2: t's
      3:ea
      4: s
      5: ie
      6: r
      7: tha
      8: n
      9: in
      10: d
      11: e
      12: nta
      13: io
      14: n
      15:in
      16:m
      17: a
      18: ny
      19:way
      20: s

      --
      Please consider this account deleted, I just can't be bothered with the spam anymore.
    53. Re:Quorum looks a lot like Pascal by idbeholda · · Score: 1

      Just for mentioning COBOL, you should be burned at the stake. Heathen.

    54. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      But when was the last time you didn't indent your code? Python only formalises something that the vast majority of programmers do.

    55. Re:Quorum looks a lot like Pascal by Fnkmaster · · Score: 1

      I like Python not because it forces *me* to indent my code properly, but because it forces all the other morons out there to indent *their* code properly.

    56. Re:Quorum looks a lot like Pascal by chajath · · Score: 1

      Because not everyone uses the same indentation as everyone else. If indentation rules need to be worked out before starting a project, you're wasting more time than a language where indentation has no meaning.

      But certainly it is a good thing to have a standardised indentation style so people don't have to worry about others' favourite formatting style

    57. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      By your logic working with python is only a matter of a "pretty printer" to convert syntactically correct python to a format you like then, with a "press of a button" convert back.

    58. Re:Quorum looks a lot like Pascal by deniable · · Score: 1

      OK, MS Word it is then.

    59. Re:Quorum looks a lot like Pascal by deniable · · Score: 1

      Maybe not, but they make it easy to bang on the % key in vi to find the other end of a big block of code.

    60. Re:Quorum looks a lot like Pascal by GigaplexNZ · · Score: 1

      Or "penisland"

    61. Re:Quorum looks a lot like Pascal by deniable · · Score: 1

      But Jehovah is implicitly integer therefore not real.

    62. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Python may be unusual in which differences in whitespace it considers significant, but not in that it considers whitespace significant. People need to stop confusing the issue.

      Thank you for stating the obvious, Sherlock. You need to stop being so pedantic. Everyone except you understood that the GP refers to the significance of whitespace for indentation or, more generally, for anything other than tokenization.

    63. Re:Quorum looks a lot like Pascal by zdammit · · Score: 1

      Well said.

      Oh, as a bonus, you can use that same tool to format code the way you prefer, and switch it back to whatever style your company requires at the press of a button. Why is this a bad thing?

      How would that work out with revision control? Your copy would always show as modified, unless you did some other trickery.

    64. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      I used a version of BASIC back in the day, it very barely needed any white space.

      PRINTI was the same as PRINT I

      Key words were tokenized on the fly to save space.

      \You would not believe the things I've seen Java Monkey.

    65. Re:Quorum looks a lot like Pascal by nschubach · · Score: 1

      And I've yet to see a codebase where it was not consistent at least on file level.

      The project I'm working on right now (with a team of 8 others working on various parts and several people working bugs) has variation in indentation and line breaks. (K&R, 1TBS [my favorite], and even some Horstman) It's simple for me to read the code because it doesn't matter if they use spaces or tabs I can still see the differentiation. Many of the files have combinations of tabs and spaces (I have whitespace characters enabled) depending on who last touched that particular method to fix the bug related to that file.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    66. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      People who consider the dictionary definition of "whitespace" when the context of the discussion obviously infers "serial whitespace" need to die AND stop confusing the issue.

    67. Re:Quorum looks a lot like Pascal by Omniscient+Lurker · · Score: 1

      I do like FORTRAN77.

    68. Re:Quorum looks a lot like Pascal by scotch · · Score: 1

      Comments in C are written /* text */. The slash-slash-to-newline comments are from C++.

      And C99, get with times.

      --
      XML causes global warming.
    69. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      It's there to make code function the way it looks.

      Call me old-fashioned, but I prefer that my code function the way it is written.

    70. Re:Quorum looks a lot like Pascal by Broolucks · · Score: 1

      On the other hand, you might as well go all the way: while ... endwhile and if ... endif are themselves much easier to read than while {...} or if {...}, because it helps a lot visually distinguishing different kinds of blocks. Sometimes it gets confusing inserting code at the right place when there are 5 closing braces in a row (which is still easier than if you have no braces at all).

    71. Re:Quorum looks a lot like Pascal by benhattman · · Score: 1

      I wish I could mod parent - meh. Essentially all languages consider whitespace. Some use it to denote end of statement or scope.

      I personally prefer punctuation to deonote the end of a statement, but I do not understand the animosity some people have for it. I do understand complaints about indentation defining scope, however; since switching between tabs and spaces can cause invisible errors. I bet if Python looked more like this

      for num in range(0, 10):
      {
          print num
      }

      than this


      for num in range(0, 10):
          print num

      that people wouldn't really care.

    72. Re:Quorum looks a lot like Pascal by benhattman · · Score: 1

      Most languages consider whitespace.

      Yes, but it should only be used when tokenizing. The idea of using it to indicate scope is absurd.

      Thank you for dictating to the rest of the world how their parser should work. I'm sure your insight will be highly regarded, Mr. Coward.

    73. Re:Quorum looks a lot like Pascal by KhazadDum · · Score: 1

      Python ignores '#' symbols, so you can use them or write #{ and #} to denote such. ;)

    74. Re:Quorum looks a lot like Pascal by KhazadDum · · Score: 1

      That's what he gets for being the One. :P

    75. Re:Quorum looks a lot like Pascal by Hognoxious · · Score: 1

      Python ended the braces style holy wars forever, which at a large company is a big thing.

      That's like curing a limp by cutting your leg off.

      The other leg.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    76. Re:Quorum looks a lot like Pascal by garyebickford · · Score: 1

      I'll just add that there is a fatal (for me) flaw in Python, which is that the indent=>block means that there is no 'parity check' in the syntactic structure. This leaves an ambiguity in the code - if a line is indented more or less than the previous one, in certain circumstances the compiler can not tell whether the line is contained in the block or not. Languages that use a syntactic element at each end of a block such as {do something;} do not have this ambiguity, and can correctly post an error when the start and end block elements do not match.

      In fairness, C and many languages with syntax derived from C have a related flaw, in allowing the operations inside an 'if' or similar elements without any special wrapping, such as 'if (foo = bar) {do something;}'. This is only one character different from 'if (foo == bar) {do something;}'. To correct this, these languages could require operations to be enclosed in braces, like this: 'if ({foo = bar}) {do something;}'. Then the compiler could correctly flag as an error a missing equal sign when comparison is meant.

      I suspect that these two syntactic faults are among the most common causes of hidden bugs in these respective language groups.

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    77. Re:Quorum looks a lot like Pascal by evil_aaronm · · Score: 1

      I kid you not: I got hollered at by my boss for - gasp! - daring to add spaces to code that looked very much like your example. I was "wasting time" by making the code somewhat readable.

    78. Re:Quorum looks a lot like Pascal by Beardydog · · Score: 1

      I knew we kept you low-numbered people around here for something.

    79. Re:Quorum looks a lot like Pascal by Lotana · · Score: 1


      def knightsWhoSay():
      #{
              return 'Ni!'
      #}

      Who said Python doesn't support block delimiters! :-)

    80. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      I'm personally not a fan whitespace having meaning within the code. But I'm also not a fan of inconsistent code style within a project, to be quite honest your project sounds like it would be a pain to work on.

    81. Re:Quorum looks a lot like Pascal by Broolucks · · Score: 1

      You know, I've always wondered why so many languages use braces the way they do. In the majority of cases, the syntactic role of curly brackets could easily be taken up by mere parentheses.

      Heck, you can actually write if/while/for statements in C replacing curly brackets by parentheses and semicolons by commas (caveats: no comma on the last statement and a semicolon after the closing parenthesis). I feel that using (), instead of {}; would make most curly bracket languages more regular. Plus, you'd get to reuse {} for templates instead of that god forsaken <> syntax.

    82. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Lol, You fucking noob. // is not a valid C comment /* This is */

    83. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      I agree that people don't usually fully grasp the white space nuances of their languages.

      As a language creator I always make sure my languages treat all white spaces ( /r /n, /s, /t etc -- even unicode U+200x ones) all equivalently -- As a token delimiter.

      However, I believe you to be a worthless pedant -- The point is that treating MORE THAN ONE whitespace or token delimiting (as in "foo bar" vs "foobar" vs "foo
      bar") character significant (AS PYTHON DOES) is retarding, and the practice does, INDEED, need to die... So does pedantry.

    84. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Your argument about pretty printers applies to Python as well. Don't like the Python indenting style? Just run it through a pretty printer.

      But the style isn't the key point. Formatting is redundant with {} -- whatever your style might be, you should be indenting somehow, and so the {} are unnecessary. So let's simplify the language, get rid of {}, and as a bonus, now everyone uses the same indenting standard.

      And finally, as the wise always say, it's not the standard that's important: it's the fact that there IS a standard!

    85. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Really wish I had mod points. I love python to bits, but I really wish I could use curly braces for code blocks and enforce my own readability standards.

    86. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      ok, your argument just sounds uninformed.

      This isn't an issue of spaces between words (foo bar vs. foobar or in a more natural language phrase such as "the sis" vs. "thesis"). There are obvious uses of spaces in natural language and I don't think ANYONE complains about those uses.

      While I can understand your argument about the C line comment, ultimately the whitespace is not significant in that case either. The parser uses the beginning of the comment to tell it to throw out everything to the end of the line. The only rule the programmer needs to know is that everything after the // to the end of the line is a comment.

      foo(); // hey there
      is exactly the same as
      foo(); // hey there

      In most languages, all of the white space is completely ignored (aside from the case where there are comments, in which case the parser has to throw out everything between the // and the carriage return as well, but still whitespace is not significant.
      foo(); // hey there
                      bar();
      Is typically interpreted by the compiler as foo();bar(); because that's all that's actually needed to figure out what's going on.

      So the problem IS that the language considers whitespace significant.

    87. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      This is like complaining in about the tyranny of having to use braces. It's part of the syntax. There has to be SOME convention for expressing the delimiting of syntax blocks, and God did not set curly braces as the one true convention.

    88. Re:Quorum looks a lot like Pascal by Compaqt · · Score: 1

      One other problem with not having the curly brackets: programmer's tools expect them, and allow you to go to the end/start of blocks with various combinations of {,},or Ctrl+{, Ctrl+} (vim, gedit).

      Regarding the assign operation inside the if condition: I believe Java flags it if you do that. As a general rule, I like to put the rvalue on the left side so that there's no ambiguity:

      Instead of if( x = 5 ), I do if ( 5 = x ) as a matter of habit. That of course, is invalid, leading you to change it to if ( 5 == x ).

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    89. Re:Quorum looks a lot like Pascal by nprz · · Score: 1

      I had a coworker that did that for both c++ and python.
      Who knows, maybe their IDE did it for them, but after they hit the 8th space, it turned into a tab. My tab width is 3, so it is completely unreadable. I refuse to set mine to 8, so I am just slowly cleaning up their mess (whenever I change their code).

    90. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Interesting... I've never run into that.

      Though I think that's one of the rare cases where you'll find that the homogeneous msft environment is nice. Everyone learns quickly to bang [Cntrl-K, Cntrl-D] in visual studio, and everything gets cleaned one way, using one, consistent set of formatting rules. And if one guy doesn't, the next guy will. It's understood.

      This keeps any checked-in code consistently formatted between developers with no diff issues.

    91. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      My guess is that Cobol would beat any of the three - it is designed from the ground up to be readable.

      So are Pascal and Python. In fact, Quorum looked a lot like Pascal from what I saw in the PDF.

      Pascal was really annoying to read. iT hAD ThIs iNTerSTINg FEATuRE WhERE iT wAs nOt case sensitive. AND THE PROGRAMMERS WERE VERY FOND OF TYPING EVERY VARIABLE IN UPPERCASE. That, and they had a lot of Types and subtypes and super-duper-subtypes that made things really a pain in the a$$. God forbid you try to compare a variable of type height to a variable of type altitude, even though you know darned well they are both just integers or whatever. And, since there were a million zillion subtypes in each program, you had to keep scrolling up to the top to figure out what the heck each variable was. Though it was somewhat readable for programs that were less than a page long. It wasn't really even strongly-typed, but it was so freaking annoying that it made me hate strongly typed languages forever.

                           

    92. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      No, it's a blank character and that's not the same.

    93. Re:Quorum looks a lot like Pascal by gfody · · Score: 2

      Modern IDEs make it so easy to convert from one style to another I wish they would just make it a display option. Then each developer could read and write in the style they prefer.

      --

      bite my glorious golden ass.
    94. Re:Quorum looks a lot like Pascal by chuckugly · · Score: 1

      Modern compilers warn on this for C and C++, so it shouldn't be a common cause of bugs.

    95. Re:Quorum looks a lot like Pascal by swalve · · Score: 1

      Complex syntax leads to errors. If it can't be done in C, it shouldn't be done.

    96. Re:Quorum looks a lot like Pascal by gfody · · Score: 1

      This is such a good idea. Even beyond vcs I would want to only ever persist syntax trees and have all formatting based on rules and exceptions stashed in my home directory.

      --

      bite my glorious golden ass.
    97. Re:Quorum looks a lot like Pascal by swalve · · Score: 1

      Parenthesis are used to send data to a function, braces are used to combine multiple lines into a single logical command. That is a useful distinction to have built into the language.

    98. Re:Quorum looks a lot like Pascal by swalve · · Score: 2

      Why use four characters when one will do?

    99. Re:Quorum looks a lot like Pascal by swalve · · Score: 0

      If you don't know the difference between compare and assign, you probably shouldn't be programming.

    100. Re:Quorum looks a lot like Pascal by cheaphomemadeacid · · Score: 0

      aww are you afraid your entire job can be replaced by a 20 line python script? =)

    101. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Languages that consider whitespace need to die.

      Apparently you've never programmed in Whitespace, a language in which legal instructions consist of combinations of blank, tabs and newlines -- all non-whitespace characters are ignored.

    102. Re:Quorum looks a lot like Pascal by cheaphomemadeacid · · Score: 0

      well there's syntax and there's programming guess what python people prefer to argue/think/bikker about? So you can say that python was a way to get all those OCD people away from the discussion boards. It worked perfectly =) Doesn't mean python is perfect, its still far from pseudo code. Oh and once you understand WHAT you are programming, programming the same thing in c/c++/perl/cobol/whatever becomes a much more trivial task

    103. Re:Quorum looks a lot like Pascal by Broolucks · · Score: 2

      That is only one of the two syntactic roles assigned to parentheses. The other is to disambiguate priority. For instance, you have to write (a + b) * c if you don't want it to mean add(a, mult(b, c)). But you see, combining multiple lines is very exactly this: priority disambiguation. Consider "if (cond) a; b". Priority is such that the statement is parsed like "(if (cond) a); (b)", because the if statement doesn't eat up semicolons. If you want it to mean "(if (cond) ((a); (b)))", then you could just put parentheses like this: "if (cond) (a; b)". Combining multiple lines into a single logical command precisely requires to override the fact that statements have higher priority than statement separators. This is perfectly consistent with what parentheses *already* do. Syntactically speaking, the if statement is to the semicolon what multiplication is to addition. Seriously.

      This being said, I consider that using parentheses both for priority disambiguation and for function calls is one of mathematical notation's biggest fuckups. For instance, a(b + c) can be either multiplication or a function call depending on context. That's just mind-bogglingly terrible. It's not nearly as bad in programming languages because straight up juxtaposition is often a syntax error, but nonetheless I would say that function calls should NOT use parentheses. They should use square or curly brackets, and parentheses should only serve to disambiguate priority, which includes grouping statements. You might see my point better then.

    104. Re:Quorum looks a lot like Pascal by mwvdlee · · Score: 1

      Which modern languages would those be?

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    105. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      It's a bad thing because Python is designed from the ground up to not be confusing and stupid like most languages. No arguing over where the damn opening and closing brackets go. No style issues. Just type the damn code and quit being a pedantic fuck. Simple.

    106. Re:Quorum looks a lot like Pascal by fph+il+quozientatore · · Score: 1

      Python is legal to marry. Wikipedia says it first appeared in 1991, so it's 20 years old by now.

      --
      My first program:

      Hell Segmentation fault

    107. Re:Quorum looks a lot like Pascal by maxwell+demon · · Score: 1

      As a general rule, I like to put the rvalue on the left side so that there's no ambiguity:

      Of course that rule fails as soon as you compare two lvalues.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    108. Re:Quorum looks a lot like Pascal by rshi · · Score: 1

      How do you match braces? Do you actually count them? Or do you look at... the indentation of the closing brace?

    109. Re:Quorum looks a lot like Pascal by mabhatter654 · · Score: 1

      But if somebody else already married Python is that bigomy? Are you married to just one version, or do you get to update?

    110. Re:Quorum looks a lot like Pascal by maxwell+demon · · Score: 1

      Yes, languages generally distinguish between presence and absence of whitespace. But Python depends on the amount of whitespace. That's almost as bad as depending on distinguishing tab and space (make, I'm looking at you!).

      Here is a set of rules any programming language should IMHO adhere to (those rules of course don't apply inside strings):

      1. Except for newline, never depend on the type of whitespace.
      2. Two consecutive non-newline whitespace characters are equivalent to a single non-newline whitespace character.
      3. A newline character preceded or followed by whitespace is equivalent to just a newline character.
      4. Two or more empty lines (including lines which contain whitespace characters, but nothing else) are equivalent to a single empty line (giving empty lines significance at all is not ideal, but acceptable).
      5. Empty lines at the beginning or end of a file are always insignificant.
      6. If your language depends on the distinction between newline and other whitespace, give a way to escape newline (preferrably by treating it as normal whitespace).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    111. Re:Quorum looks a lot like Pascal by maxwell+demon · · Score: 1

      Well, Perl has some things which make it harder to learn even for people who know how to program.

      For example, you can have a variable $foo (a scalar), and a different variable @foo (an array). Array indexing is done with postfixing [n] (where n is the index). So far, so good. Now, how do you access element 1 of @foo? Well, everyone knowing programming (but not Perl) would of course say: @foo[1], but actually it's $foo[1] because the array element is a scalar. Of course despite having "$foo" inside, it does not access the variable $foo, but the variable @foo.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    112. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      I don't know about Java but.

      Most C/C++ compilers will generate a warning if you don't put parens around an assignment in an if statement. If you enable warnings -Wall and fix the code so it compiles without any warnings, then you're good. You will never be tripped up by that, end of story. You read this all the time, just doesn't happen in practice.

      C# it's not a problem because if() _requires_ a Boolean value. So if(l = 5) isn't valid. You have to write if(l=5) != 0)

      Offhand comment no one will read, but if you step back and realize that ASCII is a language itself in that some symbols have meaning. \r is carriage return. \n is new line, etc. They are formatting symbols. It then seems like a bad idea for the language to re-purpose those symbols. Instead it should stick to the ones that are not previously defined. When you think about it you have several levels going on.

      ASCII and it's formatting language which is interpreted by editors
      The programming Language with it's grammar which the compiler understands
      User defined symbols, like 'bomb_interlocks_disabled = 1'
      And comments in human languages like /* For testing! Comment out in production code JorMcFratz (01/21/1978) */

    113. Re:Quorum looks a lot like Pascal by Compaqt · · Score: 1

      True that.

      Though there's other weird stuff I do, as well, which may increase the likelihood that the thing on the left isn't assignable. For example, I often set "int" to be an abbreviation for "final int" in my Java editor.

      So, by default, a method parameter is constant. I have to do extra work to make it variable.

      When you think about it, it should be the default, right? I mean, some caller sends you a value. Why would you want to modify it, and also call it by the same name?

      If you find yourself doing that, you might want to think more clearly about the uses of the values, and rename the variables accordingly. E.g., instead of:

      myFunc(int price) {
      price = price * quantity;
      }

      do this:

      myFunc( final int price ) {
      final int extendedPrice = price * quantity;
      }

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    114. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Languages that consider the quantity of whitespace need to die.

    115. Re:Quorum looks a lot like Pascal by chris.alex.thomas · · Score: 0

      I don't even use python and I can see the benefits of eliminating coders "style" preferences and I use the term "style" very very lightly as often it's masquerading the term "code quality"

      the problem is most likely not yourself, or me for that matter, maybe me and you do things in a consistent and readable way with the future in mind.

      the problem is the masses of shite coders who product endless amounts of crap, badly formatted, barely readable code, EVEN AFTER you ran it through a pretty printer, oh thats even if the PP program actually grokked the input in the first place and didn't crap out.

      if you work on your own, do what you want, if you work with a team, I dont give a flying fuck what your preferences are, the team leader defines the style and you follow it, or fuck off. Python makes this easier by abstracting even the team leader from making a bad choice, the language defines it, you follow it. Nobody can argue over style anymore! it's brilliant! I wish PHP had the same system.

      I'm so sick and tired of this linux dumbass mentality of "do it your own way" as what it really means is masses and masses of duplicated crap nobody can use so they try to create a better hammer, ultimately failing because they are as bad as the rest.

      I see code that is badly formatted as a reflection of the programmer, messy code == messy programmer == bad quality programmer. Fact is, if you can't keep your shit looking good and beautiful, chances are you're just a two-bit-hacker who isn't worth wasting time on.

      So if I _NEED_ a PP to read your code, you should pick up your game and realise how bad you are at your job/hobby

    116. Re:Quorum looks a lot like Pascal by bmcage · · Score: 1
    117. Re:Quorum looks a lot like Pascal by maxwell+demon · · Score: 1

      Well, thinking of it, in C++ I like the following function template to easily add const to an object's access (to force calling const methods instead of non-const ones; especially for begin/end where those return different iterator types)

      template<typename T> T const& Const(T const& t) { return t; }

      I now notice that the comparison is a perfect place to apply it:

      if (Const(a) = Const(b)) // error
      if (Const(a) == Const(b)) // OK

      --
      The Tao of math: The numbers you can count are not the real numbers.
    118. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Languagesthatconsiderwhitespaceneedtodie.

      There,fixedthatforya!

    119. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      You unterstood the argument and chose to misunderstand it.

    120. Re:Quorum looks a lot like Pascal by Darfeld · · Score: 1

      C? C??!!!! why not fortran?

      Plus C can get very ugly if you want it, sometimes even if you don't want... I wouldn't take C as an example of simple syntax. I like it and use it at work often (not by choice, thought), but I come to really hate the guy who wrote the code I'm working on.

      Really, reading people pesting about forced indent or brace is quite amusing. It like the cats of the blue hat chirch and those of the red hat chruch in Red Dwarf...

      --
      (\__/) This is Lapinator
      (='.'=) copy it in your sig
      (")_(") so it can take over the world
    121. Re:Quorum looks a lot like Pascal by Darfeld · · Score: 1

      a(b + c) can't be a multiplication. At least in C. you'll need to write a*(b+c).

      I agree the two can be easy to confuse. But there is no syntaxic ambiguity.

      --
      (\__/) This is Lapinator
      (='.'=) copy it in your sig
      (")_(") so it can take over the world
    122. Re:Quorum looks a lot like Pascal by renoX · · Score: 1

      > In the case of code written by others, run it through a pretty-printer. Problem solved.

      Ever tried to run code through a pretty-printer?
      It doesn't works well: when the initial code has some parts which are aligned for better readability, the pretty-printer destroy the alignment.

      Whatever you may say language with significant indentation helps novice, that's a fact (re)discovered several times.
      Here's one: http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-indentation-for.html

    123. Re:Quorum looks a lot like Pascal by ultranova · · Score: 1

      I've always felt that version control systems should store syntax trees, but have never had the time to do the work to do that.

      The problem is: if you store the syntax tree prior to running templates/macros, it likely will not parse, while if apply macros, all places touched by them will be different, despite not having been altered by the programmer directly.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    124. Re:Quorum looks a lot like Pascal by Darfeld · · Score: 1

      Copy/Paste is always Error prone, and you very well should reindent it anyway.

      A good programmer won't pester all days about forced indentation or brace, yadda yadda yadda... A good programmer have seen enough unspeackable horror code to know this issue isn't really one. Not to say there isn't agruments for either way, but it's really a church battle.

      The way I see it, a language that force every one to carefully indent the same way have a good point. If you can't adapt to that, you won't adapt to anything.

      --
      (\__/) This is Lapinator
      (='.'=) copy it in your sig
      (")_(") so it can take over the world
    125. Re:Quorum looks a lot like Pascal by srussell · · Score: 1

      Why is this a bad thing?

      Because unless the editor is truly idempotent, in the formatting, after you've reformatted, and then reformatted again, your version control system may think you changed lines that you didn't. This causes erroneous conflicts in merging, and renders history annotation useless.

      Which allows me to rant a little: one of the best and worst things about Go is gofmt . It's nice to have such a tool; it's not so nice that it defaults to using the OS's line endings. If you're going to define whitespace rules-of-thumb, don't wimp out when it comes to line endings.

    126. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Good luck making your programmers happy, I see nobody would even want to work in your fucking project in the first place.

      Fuck you.

    127. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Actually uncrustify can often _add_ that kind of alignment.
      Yes, it is not perfect, but for an automated tool it sure is doing a good job.

    128. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      > you very well should reindent it anyway.

      Sure. Now you just have to give people a crystal ball to figure out _how_ to reindent it (since the message board broke it, so that information is permanently lost).
      With Python the code generally is thoroughly destroyed now.

    129. Re:Quorum looks a lot like Pascal by jellomizer · · Score: 1

      Is it really that big of a deal?
      You get your pluses and minus on both sides.
      Space/Tab Nesting
      Good:
      Easy to eyeball segments
      Forces a good coding practice
      Minus:
      More work to change large block from nested code to untested
      Heavy Nesting can leave a lot of white spacing making you scroll left to read.
      Work around for the Minuses:
      Most Modern IDE and Text Editors allow you to unindent with Shift Tab after selecting a lot of entries VI and Emacs have their own way too.
      Heavy nesting means you have gone too far so you should create sub procedures for those groups.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    130. Re:Quorum looks a lot like Pascal by garyebickford · · Score: 1

      It's not a matter of knowledge, it's a fat-finger issue, and an ambiguity issue. I've seen many problems where coders have inadvertently left off one of the equal signs - I think typing too fast is the most common cause, probably because when we are typing = it is usually in an assignment statement and our fingers get used to typing only one.

      Because it is not easily spotted when scanning a large piece of code, the problem can be hard to find and debug, especially when the normal path through the statement doesn't cause significant problems. Some of these errors have to my knowledge sat unrecognized in published code for years, even decades. It may just be that the block in mind is never, or always, executed. To make it worse, when debugging others' code it may require close and careful reading and a good understanding of the code to even recognize there is a problem. How does one know whether the original writer meant to do that, and was depending on some externally-defined state of the variables involved.

      When the ten-year-old code (which has a bug that only appears every third blue moon) says "if ($foo = $bar) { do something($foo); }" how do you know (if neither $foo nor $bar are modified anywhere nearby) whether this is intended as it is? Whereas, if the language required such assignments to be enclosed in a block "if ({$foo = $bar}) { do something($foo); } then the language parser could always catch and prevent the problem trivially. IMHO modern languages should be designed to prevent trivially ambiguous structures, especially ones that involve tiny typos.

      A classic example in FORTRAN that is similar enough to be relevant involved a rocket that had to be destroyed after it went up (IIRC) 70 miles and 'turned left'. The navigation code had a loop that looked through the sky, searching for the Gemini twins Castor and Pollux. In the code was a statement "DO 100 I=1.100". (Can you see the problem?) Note that FORTRAN ignores spaces entirely, and the code was being viewed on green and white line printer output. After months of analysis, it was discovered that this was the problem line. It should have been "DO 100 I=1,100", which ran a loop 100 times. The bad code assigned 1.1 to the variable DO100I and went through the loop once. Now imagine trying to spot that bug on a line printer listing (not the fancy laser printer stuff we have now, but smudgy typewriter-looking text) in a program of 100,000 lines or so.

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    131. Re:Quorum looks a lot like Pascal by garyebickford · · Score: 1

      That's good. I haven't written C/C++ for a long time. I foresee a future version of the languages that require code blocks, with dire 'deprecated' warnings. "if ({$foo = $bar}) ..." is not that much more to write than "if ($foo = $bar)..." and definitely shows one's intentions.

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    132. Re:Quorum looks a lot like Pascal by oreaq · · Score: 1

      Yes!Whitespacesreallysuckandmakeeverythingtotallyunreadable.

    133. Re:Quorum looks a lot like Pascal by oreaq · · Score: 1

      My editor has been matching the braces for me since the early 90s.

    134. Re:Quorum looks a lot like Pascal by garyebickford · · Score: 1

      Yes. I realized a while back that every program we write is defining a language. It may be a language of mouse gestures, or button pushes, or typed input, etc. but it is a tiny (or large) language. This has informed everything I do since then. When I write a program, I try to make the language with which the program interacts with the user as coherent and rational as possible. (The user may well be another program, but the principle applies.)

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    135. Re:Quorum looks a lot like Pascal by oreaq · · Score: 1

      That's doen't change anything. Compare your head version to the version from 2 weeks ago and you get 100s of changes with 99% of them beeing only different indention, line breaks, etc and the actual change you are looking for buried somewhere between them.

    136. Re:Quorum looks a lot like Pascal by nschubach · · Score: 1

      It's really not that bad to work with the differences in formatting. I thought it would be a nightmare, but it has generally been a non-issue.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    137. Re:Quorum looks a lot like Pascal by swalve · · Score: 1

      I agree with all of what you say, but the problem is more easily solved by the IF function not accepting an assignment as its only argument. Or if parentheses weren't both the "send this info to the function" and the grouping punctuation.

      I was tasked with fixing an Epson 9000 or some thing like that, because the previous tech had gone in one too many "It's fixed" vs "no it's not" circles with the customer. Turns out, the customer's form was mostly underlines, and the self test did not test the bottom pin in an obvious manner.

    138. Re:Quorum looks a lot like Pascal by swalve · · Score: 1

      Well, I know it's because some guy said so. But if we are going to be style Nazis, why not force tabs? That's why they were invented.

    139. Re:Quorum looks a lot like Pascal by Broolucks · · Score: 1

      I was talking about mathematical notation there. I know that programming languages don't have that ambiguity, but they are nonetheless inspired from mathematical notation.

    140. Re:Quorum looks a lot like Pascal by kruhft · · Score: 1

      I find brace-less languages fantastically difficult to move code around in. At least with braces you can cut from the start brace to the end brace, and then paste without losing your scope. Doing anything like that in Python means you not only have to get the code you cut correctly bound, you also have to make sure that you get the correct amount of whitespace on every line of code you paste so as not to lose your original scoping. It's a nightmare.

    141. Re:Quorum looks a lot like Pascal by johnthorensen · · Score: 1

      And then Go! (golang) fired up the discussion by mandating the curly braces go on the same line as the conditional statement, so that they could get rid of semicolons - which to me is a much more worthy cause than eliminating braces.

    142. Re:Quorum looks a lot like Pascal by garyebickford · · Score: 1

      Indeed, but unfortunately I think history has probably made that impossible, at least for existing languages. Thus my solution of deprecating, and eventually requiring the {} structure. And even that will be objected to by the 'programming without a net' types. Actually IMHO the advantage of allowing assignment inside if statements is so minimal that disallowing it entirely would be reasonable. There are some cases where it is useful inside a while(), but it is not necessary there either, and it definitely encourages naive writers to write slower code. For example using PHP:

      $lnum = 0;
      while ($lnum < sizeof ($myarray)) {...}

      It is better to remove the sizeof() function from the while, so it doesn't get evaluated every time through the loop. But it seems simpler because you've saved one assigned variable. This is the kind of less-than-perfect code encouraged by the present syntax.

      The Epson problem reminds me of Whitespace :D

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    143. Re:Quorum looks a lot like Pascal by Hierarch · · Score: 1

      Regarding the assign operation inside the if condition: I believe Java flags it if you do that.

      Close. Java doesn't allow implicit casts from int to boolean, even though they use the same data type in the JVM. The assignment "x=5" is also an expression returning the int 5, so that things like "x=y=5" will work. C/C++ treats all non-zero ints as the boolean value true, so "x=5" ==> "5" ==> true, so "if (x=5)" is "if (5)" is "if (true)".

      In Java, that can't happen because 5 is an int, and the conditional expression must be a boolean. However, you can make this mistake in Java if you really want:

      boolean a = true;
      if (a = true) { ...; }

      --
      --Somebody infect me with a .sig virus, I'm too lazy to write my own!
    144. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      No, God uses parens, but lesser mortals fail to understand and use Algol-derived languages instead.

    145. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Sometimes it gets confusing inserting code at the right place when there are 5 closing braces in a row

      Wait, you mean to tell me that the C family of languages has embedded blocks such that you could end with 5 closing braces? The horror! And all this time everyone was on Lisp's case for closing out with a group of parens.

    146. Re:Quorum looks a lot like Pascal by KingAlanI · · Score: 1

      # is Python's comment symbol, so I figure that would work.

      --
      I listen to both RIAA and non-RIAA stuff if I like the music, tangential business/politics nonwithstanding.
    147. Re:Quorum looks a lot like Pascal by sunzoomspark · · Score: 1

      Your diff doesn't have an option to ignore white space when comparing versions? That's lame.

    148. Re:Quorum looks a lot like Pascal by jd · · Score: 1

      Which Fortran? I - IV, 77, 90, 95, 2000 or 2005? :)

      Actually, Fortran is still THE language of choice for anyone working in mathematics. There are more codes for it and the compilers are just so much better for that type of problem.

      Seriously, I "speak" 20 programming languages either fluently or close to it, so have some experience of the HORRIBLE choices some designers have made.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    149. Re:Quorum looks a lot like Pascal by Richy_T · · Score: 1

      Though using the equals sign as an assignment operator was definitely a bogus move.

    150. Re:Quorum looks a lot like Pascal by Unequivocal · · Score: 2

      My main objection to semantic indent can be summarized in this psuedo code example:

      class fubu
          function foo(bar)
              start function
              more code
              all's well
      console.log("debug message")
              more real code //end foo //end fubu

      Having that debug console statement out of band with the rest of the functional indents makes it easy to notice when scanning code. Now you might say one should never debug that way, which is fine, but I do sometimes (and know others who do), and so I don't like semantic ident languages b/c they prevent me from doing something in a way that is helpful/useful in my workstream. Sure I can solve this with search/replace etc, but I like the visual cue sometimes.

      It's a minor point but at least for me significant.

    151. Re:Quorum looks a lot like Pascal by Unequivocal · · Score: 1

      This is a pedantic point. We all know that we're talking about semantic idents.

    152. Re:Quorum looks a lot like Pascal by rthille · · Score: 1

      Yeah, C, with #define being a textual preprocessing, does make the problem much tougher, but I don't think impossible. As I imagine it, you'd apply the textual substitutions, but you'd have to keep 'annotations' on the tree so you could 'undo' them in the deconversion for editing. Same with comments, either they'd have to become part of the syntax tree, or be kept as 'annotations' to items, and you'd have to 'guess at' (given just the text) to what node in the parsed tree the comment should be attached.
      Another language, like Python? (not familiar enough with it) might not have those problems.

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    153. Re:Quorum looks a lot like Pascal by Mr+Z · · Score: 1

      My problem with tabs vs. spaces is that too many people change the meaning of tab to match their preferred indentation amount, rather than leaving tabs at 8 spaces, and letting their editor opportunistically convert spaces to tabs. So, when I open a file, the formatting might be completely gonzo if I got it from someone who set their tab stops to 3, for example, especially if it's internixed with code that uses spaces.

      The other problem is that even when everyone agrees on where the tab stops are, tabs and spaces look identical by default in most editors. And if you set your editor to provide a visual indication of tabs, it's no longer whitespace, now is it?

      If only we could have left tab damage behind in USENET cascades....

    154. Re:Quorum looks a lot like Pascal by Zenin · · Score: 1

      "But Python depends on the amount of whitespace. That's almost as bad as depending on distinguishing tab and space (make, I'm looking at you!)."

      Actually Python also distinguishes between tab and space (since it can make no assumptions on how many spaces equal 1 tab). So "1 tab + 4 spaces", while it may look identical to "12 spaces", "8 spaces", or "6 spaces", etc, depending on your editor's view settings, Python doesn't consider them equivalent whatsoever.

      This means that people using the (incredibly stupid) default settings of Emacs will produce indents with a mix of spaces and tabs (indent = 4, tab char = 8, 3 level indent = 1 tab + 4 spaces). While that's a huge pain in the ass for any language when dealing with more then one developer (Emacs was first and still still pretty unique in even allowing the completely inane setting of tab size != indent size), it's still just a formatting pita....actual code functionality isn't affected nor does the reader's logical view of the code differ from the actual execution.

      Python however? No matter how the code *looks* on your screen, if there are tabs in it you're playing Russian Roulette with your execution trees.

      Tab characters as valid whitespace has proven an exceptionally bad idea in any language (even make, which is stuck with it), and the first thing any source control admin should do is ban commits of any code file (that isn't a make file....) that has a literal tab character.

      Honestly, the moment Python decided whitespace would affect execution logic, they should have banned all tabs as a compile time syntax error no matter where or why they're found in the file.

      --
      My /. uid is better then your /. uid
    155. Re:Quorum looks a lot like Pascal by lgw · · Score: 1

      Smart shops take care of it with a check-in beautifier script that normalizes style. Sadly I havne't worked at one of those.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    156. Re:Quorum looks a lot like Pascal by chris.alex.thomas · · Score: 0

      you see!! it's working, I'm weeding out the crap, shit, hacky programmers and only the only good programmers will be left. So in a way, I'm completely happy with your "fuck you" it means I don't have to deal with your bullshit crap code and now I get more time to spend with professionals! it's a win-win situation!

    157. Re:Quorum looks a lot like Pascal by allo · · Score: 1

      try to read a diff from version a to e, where b was white-space change and c was logical, d white-space and e logical ... now seperate white-space changes from logic changes in your head. good luck.

    158. Re:Quorum looks a lot like Pascal by Anguirel · · Score: 1

      Many (if not all) good text editors will allow you to add indents uniformly to blocks with tab, and remove them with shift+tab. That should allow you to retain scope appropriately for Python relatively easily (and is what you could be doing for your brace-copies anyway, so they retain proper indentation for flow and readability without hitting a auto-re-indent function).

      --
      ~Anguirel (lit. Living Star-Iron)
      QA: The art of telling someone that their baby is ugly without getting punched.
    159. Re:Quorum looks a lot like Pascal by amirulbahr · · Score: 2

      Oh the fucking irony of it. I was trying to post the following using pre and code tags without success and just ended proving your point:

      Sure. Because

      def function(): if condition: while ok: do_something() end while end if end def Is much more readable than: def function(): if condition: while ok: do_something()

    160. Re:Quorum looks a lot like Pascal by kruhft · · Score: 1

      Yes, I realise that my editor (emacs) has an indent region function, and I use it when I move python code around. But I still have to think about how much to indent, and if i don't I can change the meaning of my code. In braced languages, I can simply re-indent the lines without thinking and the meaning of my code still stays the same. If python had braces I would say it would be one of the most perfect high level languages, without it...just a decent one.

    161. Re:Quorum looks a lot like Pascal by Skreems · · Score: 1

      While true, the number of cases that break with next-line style braces are vanishingly small. In practice you can write tens of thousands of lines of javascript without ever running into this problem.

      --
      Slashdot needs a "-1, Wrong" moderation option.
      The Urban Hippie
    162. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      Perfect solution, because there are no programmers who modify the code but leave the comments unchanged.

    163. Re:Quorum looks a lot like Pascal by DragonWriter · · Score: 1

      Yes, but it should only be used when tokenizing. The idea of using it to indicate scope is absurd.

      I'm not particularly fond of Python's indent-sensitivity, OTOH, its useful for lots of people and not particularly troublesome for me. I don't see any basis for characterizing it as absurd. I think that too many people mistakenly equate "it doesn't match my preferences" with "it is objectively wrong".

      Comments in C are written /* text */. The slash-slash-to-newline comments are from C++.

      C has changed since the 1980s -- largely due to interaction with C++.What you said was once true, but is no longer.

    164. Re:Quorum looks a lot like Pascal by Hognoxious · · Score: 1

      Python is legal to marry. Wikipedia says it first appeared in 1991, so it's 20 years old by now.

      Age isn't the only consideration. Most jurisdictions have some requirement concerning "soundness of mind", which at least one of the parties would fail.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    165. Re:Quorum looks a lot like Pascal by DragonWriter · · Score: 1

      We all know that we're talking about semantic idents.

      No, the statement "languages that consider whitespace need to die" comment was clearly attempting to present semantic indentation as a violation of some more-general rule.

    166. Re:Quorum looks a lot like Pascal by Radres · · Score: 1

      The diff from:

      if(x==2){System.out.println("I love Java");}

      to:

      if (x == 2)
      {
              System.out.println("I love Java");
      }

      is regarded as more than just whitespace for any diff program I've ever worked with.

    167. Re:Quorum looks a lot like Pascal by Radres · · Score: 1

      If you can get your team to agree on a code formatter, then yes. But my experience has been that even if one or two guys don't use it, then the files that they work on will end up being different from everyone else's and the system breaks down. Depending on the project, you may have silos of code that certain developers will work on most of the time and only rarely will anyone else get to touch those files.

    168. Re:Quorum looks a lot like Pascal by Hognoxious · · Score: 1

      Because in practice, the automated code cleaner results in almost every line of code in the file to have a difference highlighted by my company's source code repository diff generator.

      I'll be charitable and suggest that the diff generator is the only thing you mentioned that's a pile of shite.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    169. Re:Quorum looks a lot like Pascal by Hognoxious · · Score: 1

      All sane people use meaningful names for variables/functions/classes and write useful comments.

      We kan has langwij wid dat?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    170. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      Don't know about language, but a lot of magic in e.g. Rails requires that you use meaningful names for identifiers your model.

    171. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      They do invent their code properly. It's YOU that's wrong, you monger.

    172. Re:Quorum looks a lot like Pascal by Hognoxious · · Score: 1

      It can tell that a variable named isInvoice should really be named isNotCreditNote?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    173. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      No, but it can tell that a property corresponding to a one-to-many relationship with an entity named "Person" should be named "people".

      It would be nice to have a compiler that also does semantic checking on variable names, and slap the programmer when he names something wrong, but unfortunately we aren't there yet. ~

    174. Re:Quorum looks a lot like Pascal by Lodragandraoidh · · Score: 1

      You must have never come in contact with an ASCII character code table before then...

      Space is represented by : 32 040 20 00100000 (decimal, octal, hexadecimal, binary respectively)
      Tab is represented by: 9 011 09 00001001

      That is traditionally 'whitespace'. This may have different encodings using other systems (EBCDIC etc).

      As for your /n 'newline' -- or better expressed as end of line, or EOL -
      It all depends on what hardware/operating system you are running on when you write your text file to disk:
      Linux and Unix (and numerous other related and unrelated OSs) use Line Feed to represent the EOL marker.
      Windows/DOS use Carriage Return - Line Feed (2 characters) to represent the EOL marker.

      Carriage Return is represented by: 13 015 0D 00001101
      Linefeed which is represented by: 10 012 0A 00001010

      If you are talking about regular expressions - then /n may not be considered whitespace -- because it can serve as a delimiter -- represented by $ character. This also translates to editors such as vi. In Fortran and Python, the EOL marker is significant because it represents the end of a statement...and there are was to 'escape' the EOL such that a single statement can extend beyond a single line. As such it is not considered 'whitespace' during compilation.

      So really what is/is not whitespace comes down to a mix of operating system, tool/programming language and libraries (e.g. regex) used when parsing said text file.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    175. Re:Quorum looks a lot like Pascal by shutdown+-p+now · · Score: 1

      I know the ASCII codes for space, tab etc, thank you very much. I've no idea what point you thought you'd be making by giving them - with octal and binary even. It's certainly completely irrelevant to the definition of whitespace. Neither does it matter whether a given platform uses \n or \r\n for end of line.

      The most general definition of whitespace is that it is any codepoint that does not represent a visible mark, but occupies some area on the page (more precisely, affects the positioning of the adjacent characters) - hence the name.

      In a regular expression, \s or [:space] (whitespace) matches [ \t\r\n\f] - at least in Perl and everything that uses compatible syntax, which is pretty much everything - so you're plain wrong in that regard. In Unicode, whitespace is defined as a list of characters which include newline.

      Thus, when we talk about "semantic whitespace" in the context of programming language syntax, end of line definitely qualifies (there are languages where whitespace - including newlines - does not carry any semantics, e.g. Lua). A specific language grammar can have a production named "whitespace" that only includes the characters that this particular language ignores - often comments are included - but that's an abuse of the term.

    176. Re:Quorum looks a lot like Pascal by Darfeld · · Score: 1

      Well, the last Fortran I know would be 90, so I guess I'm not really up to date.

      --
      (\__/) This is Lapinator
      (='.'=) copy it in your sig
      (")_(") so it can take over the world
    177. Re:Quorum looks a lot like Pascal by Darfeld · · Score: 1

      Most message board have mechanisme to deel with that.
        either with plain text format or code balise or what ever.
          So the indentation can be save. It's not that difficult to do and anyway you should use it when capy/pasting code on whatever.
        Just for the sake of being readable, you know? For the case someone doesn't want to mindlessly copy code they know nothing about...

      --
      (\__/) This is Lapinator
      (='.'=) copy it in your sig
      (")_(") so it can take over the world
    178. Re:Quorum looks a lot like Pascal by Anonymous Coward · · Score: 0

      in certain circumstances the compiler can not tell whether the line is contained in the block or not

      Which circumstances are these? I suspect if this were truly occurring there would be a lot of failing-to-compile python code out there.

    179. Re:Quorum looks a lot like Pascal by nessus42 · · Score: 1

      You're the one making the mess, not your coworker. It's anti-social to set your tab space to anything other than 8 if you share files with anyone else. Terminals always use a 8-spaces to a tab, so if you change your tab setting, then your files don't look right when catted to the terminal or output with "more" or "less" or printed using "lpr", etc., etc., etc.

      Re 8 spaces automatically getting turned into tabs: yes Emacs will do this automatically. The reason for this is that the meaning of tab is well defined, so there is no reason to avoid doing what Emacs does. Unless of course someone works with people like you. Which is why everywhere I've worked we've just had a no tab policy. That readily shuts down the pointless debate. I.e., you're not allowed to have tabs in any files that you check in. Fortunately, you can tell Emacs that this is what you want.

      |>ouglas

  12. Also... by Ardeaem · · Score: 5, Insightful
    They also say that

    While Perl has never had a particular reputation for clarity, the fact that our data shows that there is only a 55.2 % (1 - p) chance that Perl affords more accurate performance amongst novices than Randomo, a language that even we, as the designers, nd excruciatingly difcult to understand, was very surprising.

    This is a complete misunderstanding of what a p value means in statistical inference. The p value is not, and should not be interpreted as, the chance that "Perl affords more [or less] accurate performance." The p value is the chance, given that there is no difference, of obtaining a difference as large or larger. This is covered in first-year statistics.

    1. Re:Also... by interval1066 · · Score: 1

      ...of what a p value [wikipedia.org] means in statistical inference. The p value is not, and should not be interpreted as, [perl's divergence in] accurate performance." The p value is the chance, given that there is no difference, of obtaining a difference as large or larger.

      And they say English can't be obfuscated like programming languages.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    2. Re:Also... by martin-boundary · · Score: 1
      To (wildly) paraphrase: the p-value is the chance that a random fluctuation of the test metric could change the conclusion of the test.

      When the p-value is close to 1, fluctuations dominate and the conclusion is useless. When the p-value is close to zero, the conclusion is robust enough to witstand natural fluctuations.

    3. Re:Also... by retchdog · · Score: 1

      he said it about as clearly as it could be said without dumbing down the idea beyond recognition.

      english is fine; take a statistics class.

      --
      "They were pure niggers." – Noam Chomsky
    4. Re:Also... by zippthorne · · Score: 2

      If p is the chance, given no difference, of obtaining a result that is larger, what would you interpret (1-p) to mean?

      --
      Can you be Even More Awesome?!
    5. Re:Also... by dewatf · · Score: 1

      Significance testing is poor and confusing way of doing statistics that is used mostly in the humanities. The standard method of estimation is much better at conveying the magnitude of the difference and accuracy and likely repeatability of the experiment. Most academic who use significance testing never understood first year statistics anyway. There is a good argument on this issue here:
      http://www.abc.net.au/rn/ockhamsrazor/stories/2011/3333636.htm

      I suspect that one of the reasons that Quorum did better in the experiment what that it uses white space rather than semi-colons and brackets. Misplaced semi-colons and brackets are common trivial errors that experienced programmers make. For novices writing in an editor (without any syntax highlighting or compiler errors to pick them up) under exam conditions that would be a major issue. It will be interesting to see their suggested further research with larger sample and languages like Python and C included.

      On Perl. Perl was not a carefully designed language. It was intended for for text processing and just grew with the functionality of a shell, sed, awk, REs, bits of OO and whatever else you can think of thrown in. It is large, irregular and requires of lot of learning by rote and practice to master. It is very powerful and efficient at doing what it does but I don't think anyone is going to claim that it is a good language for quickly teaching the concepts of programming to beginners or the disabled. Which is what the authors of the paper are interested in and are comparing.

      And if Perl is so wonderful and easy to use then why have they spent over a decade trying to clean up the syntax, reduce the number of ways of doing the same thing and improve the implementation with Perl 6? A neater language with Perl's functionality may have been a good idea but it has taken so long that other languages have been developed to fulfill roles (PHP, Java, Javascript, C#, Python, Ruby, Haskell etc) along with languages designed for modern issues like concurrency and cloud based applications e.g. Go, Opa and Dart.

      Perl's main advantage are that there are lot of people who can do stuff quickly in Perl 5 and there is a lot of code available on the net. Perl 6 will now have little to offer because you would have to rewrite everything. It will be easier to back port new functionality where useful into Perl 5 (as is happening e.g with say (which is another illogical bit to have to learn by rote)) than to do that.

    6. Re:Also... by Paradigma11 · · Score: 1

      If p is the chance, given no difference, of obtaining a result that is larger, what would you interpret (1-p) to mean?

      not as the chance that there is a difference.

    7. Re:Also... by Anonymous Coward · · Score: 0

      Maybe their first-year statistics textbook was written in Perl

    8. Re:Also... by Anonymous Coward · · Score: 0

      The chance, given no difference, of obtaining a result that is not larger.

      Which is not the same as a chance, given a difference, of obtaining a result that is larger.

    9. Re:Also... by Anonymous Coward · · Score: 0

      1 - (the chance, given no difference, of obtaining a result that is larger)

    10. Re:Also... by Anonymous Coward · · Score: 0

      If p is the chance, given no difference, of obtaining a result that is larger, what would you interpret (1-p) to mean?

      The chance, given no difference, of obtaining a result that is smaller.

    11. Re:Also... by Anonymous Coward · · Score: 0

      That one is comparing apples and oranges. That is, p and 1 - p are irrelevant, because the researcher does not understand how to use them.

  13. Coding in Randomo by Anonymous Coward · · Score: 0

    I have heard that in Randomo shops they create variable names by closing their eyes and pulling tiles from a Scrabble set.

    1. Re:Coding in Randomo by 0123456 · · Score: 1

      I have heard that in Randomo shops they create variable names by closing their eyes and pulling tiles from a Scrabble set.

      We stopped doing that after we realised that the variable names were spelling out messages from dead serial killers.

  14. Their data... by Anonymous Coward · · Score: 0

    Is it just me or do their graphs actually show perl above randomo in all tasks? I mean peal is in the 40-60% while randomo is near 20-40%.

    The conclusion is then that quorum has 80% compared to 20%, which is significant while the 40 to 20 is not. I call BS.

  15. In a hundred years we will see this as brilliant.. by SirSpammenot · · Score: 2

    But for now... If I were a Samurai, I would not start newbies with a live sharp sword. And Modern Perl is so, so very sharp...

    I keep reading the full paper (+points for publishing the whole thing!) and have yet to hit upon the definition of the word "accurate" they are using to measure the results. Apparently that is contained inside their previous paper with no direct link. On page 3 though, Perl is described as "A well-known commercial programming language". Really? C# is a commercial language, Perl is an Open Source language with wide commercial adoption that has evolved or the years into several distinct beasts.

    --
    1 Dachshund + 1 Dachshunds = A Paradox.
  16. Dear Southern Ilinois University Researchers: by Anonymous Coward · · Score: 0

    If you give someone Fortran, he has Fortran.
    If you give someone Lisp, he has any language he pleases.
                    -- Guy L. Steele Jr.

    Yours In Moscow,
    K. Trout

  17. Better is a strong word by Hentes · · Score: 1

    The participants didn't know the languages before. If anything, the study only proved that Perl has a steep learning curve.

    1. Re:Better is a strong word by Marc_Hawke · · Score: 1

      This is what I'm interested in. So Perl isn't that great for the first program you ever write. However, after you've written 10,000 lines of code, which is better?

      I read their example scripts. Quorum was annoyingly wordy and I had to 'tune out' the English words in there to see what the data was doing. Randomo was difficult because it broke conventions that I've been using for 20+ years (e.g. / as an assignment operator). However, Perl I'm very fluent in, and it was a breath of fresh air to read, (except they are lousy Perl programmers and I would have written the program differently.)

      I figure another experiment would be to give these same people a week worth of instruction and have them start writing programs and judge that.

      I think what this study might say is that 'Intro to Programming would do well to start with a 'novice friendly' pseudo code. The major drawback to that is that if you don't have something that can compile and run, you lose almost all of the positive reinforcement that programming affords.

      --
      --Welcome to the Realm of the Hawke--
  18. Users??? by Anonymous Coward · · Score: 0

    .....Perl users were unable to write programs......

    Users do not write programs. The entire paper is invalid.

     

  19. APL by sprior · · Score: 1

    Didn't APL prove this a long time ago?

    1. Re:APL by gestalt_n_pepper · · Score: 1

      It did but almost nobody could read the code to figure it out.

      --
      Please do not read this sig. Thank you.
    2. Re:APL by garyebickford · · Score: 1

      Ahh, write-only programming. I still think APL is one of the best languages out there, even though I never achieved proficiency (though I might have if I'd actually used it for more than just personal experimentation.) For the problem space that it addresses, it truly does eliminate almost all need to consider the idiosyncrasies of computers and languages, and allows the user to think purely in the framework of transforming an the input data set to the output data set, via a simple symbolically defined transform. The problem is that most of us (including me) find it difficult to think of a problem in these abstract, wholistic terms, so we work better by nibbling off small bits until the whole problem is gone. Perhaps it's best viewed as the most concise functional programming language, although it does not force a pure functional model.

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    3. Re:APL by Count+Fenring · · Score: 1

      The other problem being that half the symbols used aren't on any modern keyboard ;-)

  20. Well written Perl by danbuter · · Score: 3, Interesting

    When Perl is well written, including indents and not jamming multiple lines all together on one line, it looks very similar to Python, but with a semicolon at the end at each line.

    1. Re:Well written Perl by arth1 · · Score: 1

      Not each line. Only lines that need to be separated. There's no need for a semicolon if the next line is a closing curly, for example.

      Some insert them anyhow, and I can see the rationale for doing so. But unfortunately, that also encourages cut/paste programming, which is especially bad for perl. I remove superfluous semicolons precisely so I will have to stop and think before doing a cut/paste job.

    2. Re:Well written Perl by Anonymous Coward · · Score: 0

      Yes, and when you paint a horse black and white, it looks very similar to a cow

    3. Re:Well written Perl by bussdriver · · Score: 1

      A horse is way faster than a cow. probably smarter too.

    4. Re:Well written Perl by Anonymous Coward · · Score: 0

      Example required. I don't see Perl code that similar to Python apart from being well-indented.

    5. Re:Well written Perl by jnelson4765 · · Score: 1

      It does tend to look that way, yes, but Perl still puts a lot of emphasis on metacharacters to imply functionality. I still keep a cheat sheet of the builtins, and I've been working in Perl for a year and a half straight...

      Python, on the other hand, is very easy to just write. No weird '$@' or '$_' or '<=>' functions, or dereferencing an array ref into an array with @$arrayref...

      --
      Why can't I mod "-1 Idiot"?
    6. Re:Well written Perl by Our+Man+In+Redmond · · Score: 1

      When Perl is well written, including indents and not jamming multiple lines all together on one line, it looks very similar to Python, but with a semicolon at the end at each line.

      Well, it looks very similar to Python with a semicolon at the end of each line written by a Python programmer who went over to Costco and bought a year's supply of punctuation and it was nearing its expiration date.

      --
      Someone you trust is one of us.
  21. If you give someone Lisp, by Latent+Heat · · Score: 2

    I was going to post a string of close parens as representing the termination of a Lisp program, but the comment moderation nanny would not let me do that. So much for trying to tell a geek joke around here.

  22. Southern Illinois University-Edwardsville by ToSeek · · Score: 1

    It's something of an injustice to credit "Southern Illinois University" researchers for this. The unmodified SIU is in Carbondale, while these researchers were in the Edwardsville branch.

    1. Re:Southern Illinois University-Edwardsville by Anonymous Coward · · Score: 0

      It's actually kind of an injustice to SIUE (which despite being somewhat of a commuter school in the past has now passed up SIUC in many academic standards... not that that's particularly difficult...)

    2. Re:Southern Illinois University-Edwardsville by Anonymous Coward · · Score: 0

      It has been a long time since I have heard anyone say just SIU it's been SIUC and SIUE for quite a while, the only time I guess is in sports and it doesn't matter because Edwardsville isn't Division I for anything. If I remember right SIUE got uppity about it being called SIU and they actually changed it to SIUC.

    3. Re:Southern Illinois University-Edwardsville by bobaferret · · Score: 1

      I think you're right. I grew up with it being SIU and SIU-E. I still consider SIU-E an extension center/ interloper. But having never actually gone to either school, I could care less and simply pass the time by making fun of them and watching the quality of their students drop. They [SIUC] used to have separate classes for newly enrolled students without the proper math and/or English skills to catch up to the collage level. As of this year, because over 54% of new freshmen don't have those skills, they just included it in as part of the curriculum for ALL incoming students. I do enjoy all of the student loan money they bring to the area though, we wouldn't exist anymore with out it.

  23. "if you see readable, understandable Perl code" by Quila · · Score: 1

    One of these days that may happen to me.

    1. Re:"if you see readable, understandable Perl code" by DudeTheMath · · Score: 1

      If you're hiring, I'll send you some of mine.

      --
      You save only 59 seconds over 8 miles by going 75 instead of 65. Do you really have to pass that guy? Do the Math!
    2. Re:"if you see readable, understandable Perl code" by Quila · · Score: 1

      I consider Perl an inherently ugly language.

    3. Re:"if you see readable, understandable Perl code" by Anonymous Coward · · Score: 0

      You save only 59 seconds over 8 miles by going 75 instead of 65.
      Sometimes the thrill of zipping along tight country lanes is more important than getting there first. Please check your assumptions at the door.

  24. Java? by Weezul · · Score: 1

    How is Java better than C++?

    --
    The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    1. Re:Java? by gangien · · Score: 1

      IMO

      ability to be read by third party
      portability (gl having that C++ app run on z/OS, where as with java quite doable.)
      availability of third party libraries, that will work. Also, HF trying to port that C++ library that you now need to compile to an .so(or is it .sl?) on AIX.
      far less gotchas and weird oddities of the language (friends for instance)
      consistency because java is compile once, for every platform, you only have to deal with one compiler, where as with C++.. every platform..

      a few points off the top of my head

    2. Re:Java? by jd · · Score: 1

      It's a purer paradigm (which generally makes for cleaner code), you can't free an unmalloced structure or do other illegal pointer arithmetic in Java, C++ has way way too many different approaches munged into one language (it's not OO, it has support for objects - making it object-based - but it also has support for a host of other paradigms), it doesn't take a decade for the standards body to produce updates, and Sun did a reasonable job of killing dialects - the main threat to any language.

      Having said that, Digital Mars' D is better than either, I very much prefer Occam for parallel work and I'm sure other excellent languages are out there.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    3. Re:Java? by wisnoskij · · Score: 1

      Because a group of people purposely thought out how to best make a language and then made it all in one go for Java and C++ has been hacked together as a better alternative to assembly over the course of a decade and it shows.

      --
      Troll is not a replacement for I disagree.
    4. Re:Java? by wisnoskij · · Score: 1

      Well there are lots of reasons, but there is one that basically sums up the the others pretty well.
      C++ does not even do order of operations correctly and like the rest of the language they just hacked in a "fix" without actually solving the initial problem.

      --
      Troll is not a replacement for I disagree.
    5. Re:Java? by cheekyjohnson · · Score: 1

      Because I said so. And my opinion is an absolute fact of the universe.

      --
      Filthy, filthy copyrapists!
    6. Re:Java? by Weezul · · Score: 1

      D huh? I've never looked into it.

      I prefer functional languages myself.

      --
      The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    7. Re:Java? by Weezul · · Score: 1

      I've never considered Java any more readable than C++ honestly, reading both consist mostly of a series of realizations that "Ahh, this object is yet another badly hacked together attempt to provide lambda abstraction of an algorithm".

      Java offers less chance for inheritance related errors given the no multiple inheritance thing, which probably helps if you're reading for correctness, not simply understanding. You should not be using any inheritance if you want correct code of course, but hey less is better.

      I'd agree that C++ has been a step backwards in portability from straight C though.

      --
      The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    8. Re:Java? by jd · · Score: 1

      I'm ok with functional languages, but freely admit that I've concentrated on procedural languages. The main problem I've had with functional languages is that lambda expressions can be damn hard to read - or write - though that's just a learning-curve thing. A secondary issue is that it's actually quite difficult to figure out how to parallelize code outside of either the object (parallelizing OO is trivial, though parallelizing it well is hard) and procedural domains. Attempts by the University of Manchester to develop in the 1970s compilers that could intelligently regroup expressions such that each group could be a distinct parallel task never really got anywhere and I've not seen much in the way of any serious attempts since. Haskell has no serious parallel processing capability, for example.

      Occam-Pi is one of the few hybrid procedural/functional languages (the Pi is both a play on words, since it's an extended version of Occam 3, and a reference to Pi calculus) that I like. It has a few problems, though - the development server was hacked and damaged, there IS only one group developing it, I am one of about a half dozen outside the group who even uses the language, the compiler is more designed for research than producing highly-optimized code, manuals don't exist for that version and it would be extremely hard to develop hooks for Gnome or KDE with it. Having said that, if someone wrote a decent GCC frontend for it, I could easily see all these being fixed.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    9. Re:Java? by Anonymous Coward · · Score: 0

      You should not be using any inheritance if you want correct code of course, but hey less is better.

      Using inheritance correctly can (and does) improve code. The alternative of encapsulating another object and then implementing a shared interface involves a lot of boilerplate code and misses some of the benefits, so I completely disagree that inheritance is a bad thing.

      Can you defend your statement and enlighten us on why you think inheritance is so bad?

    10. Re:Java? by Weezul · · Score: 1

      Aren't the languages designed for parallel processing usually functional? Erlang, Concurrent ML, etc. Haskell has lovely research around parallelization. All the math languages like Mathematica, Octave, etc., well kinda.

      Functional languages are reasonable to parallelize because the compiler derives what the 'state' should be anyways.

      --
      The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    11. Re:Java? by lgw · · Score: 1

      And yet, C++0X has lambda (and Boost has had it forever), and Java 7 doesn't. That's pretty messed up. With the meh-ness of Java 7, C# remains Java done right.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    12. Re:Java? by guybrush3pwood · · Score: 1

      My friend, you got smacked by a troll. Don't worry, you're not the first, and won't be the last. May I refer you to a support group in your area?

      --
      Perhaps I'm trolling, perhaps I'm not.
    13. Re:Java? by jd · · Score: 1

      A lot of the parallel languages I've encountered (UPC, Occam, Parallel Fortran, etc) are procedural. The 4th and 5th generation languages that I know of that I know are also parallelized (Parlog, for example) are dead and you don't even need Netcraft to confirm it. However, I'm more than happy to get updates in these sorts of areas (damn functional programmer's mailing list won't let you subscribe unless you're hyperactive in the field) so thanks for the correction.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    14. Re:Java? by Musc · · Score: 1

      Because I said so. And my opinion is an absolute fact of the universe.

      What exactly is an "absolute fact of the universe", and how does it differ from a plain-old ordinary everyday fact?

      --
      Hamsters are at least as feathery as penguins. HamLix
    15. Re:Java? by cheekyjohnson · · Score: 1

      It differs from an ordinary everyday fact by being my opinion, of course.

      --
      Filthy, filthy copyrapists!
  25. long term benefits by e**(i+pi)-1 · · Score: 1

    While it is important for adoption how fast one can learn a language, the long term benefits are much more important. I also needed time to get used to Perl but is now a programmable languages very dear to me: it is reliable, has a great culture, is fast, does evolve only slowly and can be extremely powerful. This is similar to LaTeX, which needs first some efforts to learned but after a while runs circles around any other text processing system. Other programming languages or text processors might be easier to get started with, but they do not scale and limitations will eventually lead to frustration.

  26. It's the study participants. by IBitOBear · · Score: 1

    You know, the "study" (which I didn't read, this being slashdot 8-) probably involved exposing the languages in question a hugely diverse and wide ranging number of College Undergrads That Fancy Themselves Programmers. As such, the fact that the quality of the code was not distinguishable despite the language chosen indites the programmers more than the languages.

    The problem with most studies is that College Freshmen already know everything so any attempt to test them is doomed to fail.

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
    1. Re:It's the study participants. by Pence128 · · Score: 1

      Well, there were 19, but one quit so 18. And they specifically chose college undergrads that don't fancy themselves programmers. I think the lesson learned is that Perl is not a beginner's language.

      --
      404: sig not found.
    2. Re:It's the study participants. by maxwell+demon · · Score: 1

      And my suspicion is that they chose Perl exactly for that reason, to make their own language, Quorum, stand out.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  27. As the saying goes... by Anonymous Coward · · Score: 0

    Never put your Perl before swine... er, wait, what was it again?

  28. funding = $428,054 unless horrible_research; by Anonymous Coward · · Score: 0

    $428,054 of taxpayer dollars went to pay for this piece of garbage research.

  29. Experiment seems flawed by Anonymous Coward · · Score: 0

    From the paper: "Randomo [is a] programming language based largely on the syntactical structure of Quorum [...] many of the keywords and symbols were chosen randomly from the ASCII table."

    The syntax of a language includes a lot more than the keywords; it's the structure, the types of commands, and so on. But the overall structure of Randomo is the same as that of Quorum, it's only the keywords that were replaced.
    Even if you buy all the rest of the experimental setup, all the authors have shown here is that Perl's keywords and symbols are no better than randomly chosen keywords and symbols. (And really, any idiot who's ever looked at Perl code could tell you that ;-)
    Also, their tasks are very basic and only use a total of about 10 keywords + symbols. Not so hard to remember, even if they're totally random. Try something more complicated and show us how that goes.

    This experiment seems almost tailored to get the results they got. They only used novice programmer who'd never seen Perl before (I would hardly call them "'Perl users" like they do in the abstract). Even worse: "we did not train participants on what each line of syntax actually did in the computer programs. Instead, participants attempted to derive the meaning of the computer code on their own". They were given only 7-10 minutes to solve each task, including figuring out what their code samples mean. Clearly if you've never seen Perl code before, it's going to take you more than 7-10 minutes to understand what's going on. And if you look at the code for their made-up language, Quorum, it's insanely verbose, e.g.:
    "action z(integer a, integer b,
    integer c) returns number
    number d = 0.0"

    Of course this is easier to learn if you're not given any explanations about what the keywords mean. But what programmer, short of a total novice, wants to code in a language like that?

  30. Perl and language by knarf · · Score: 2

    Perl is a language, just like Dutch, Swedish, English, German and most of the others. In just about any language there is, to paraphrase a well-known Perl motto, more than one way to say something. That is in many ways a good thing, especially when it comes to using the language creatively as a novelist or poet or similar type of wordsmith does.

    It is true that this quality does tend to make Perl programs somewhat hard to grasp for the uninitiated in the programmers style of writing. That is another quality the Perl language shares with those other languages mentioned above - did you understand all of Finnegans Wake the first time you read it?

    In other words, Perl is a writers' language. It is not an editors' language. Once you get into the right mood, Perl flows like your native language does. Done right, this can lead to great things. It can also lead to the sort of notes you made when attending those lectures you did not care about in the first place, and did not understand in the second. Use Perl for things you care about, and it will provide you the means to express yourself in just the right way (for you).

    --
    --frank[at]unternet.org
    1. Re:Perl and language by Anonymous Coward · · Score: 0

      There are many languages that offer more than one way to express a concept. What makes Perl so different/wonderful/awful is that there are usually at least half a dozen ways to do anything, and at least 3 of those ways result in an expression that is indistinguishable to the untrained eye from modem line noise. In the old days, a loose phone connection and a Hayes Smartmodem were the tersest Perl mongers on the plante.

  31. Novice ? by Anonymous Coward · · Score: 0

    Er.... no novice can write "perl" code. This is as true as winters being cold.

    Perl is a very complex language. More complex than traditional procedural languages which "novices" are used to. It's hard to do anything useful with perl when you start, as it is easy to write complex stuff when you learn it.

    I don't even know why perl shows up here.

    How can a perl novice understand what "chomp while chomp;" does ?

    1. Re:Novice ? by chromatic · · Score: 1

      How can a perl novice understand what "chomp while chomp;" does ?

      Could said novice read the documentation?

  32. I thought... by kenh · · Score: 0

    I thought Perl WAS a randomly generated language - you mean someone came up with Perl on purpose?

    --
    Ken
    1. Re:I thought... by BenSchuarmer · · Score: 1

      Larry Wall came up with Perl on purpose.
      He is well known for having a wierd sense of humor.

  33. Perl can be very powerful by Anonymous Coward · · Score: 0

    But for now... If I were a Samurai, I would not start newbies with a live sharp sword. And Modern Perl is so, so very sharp...

    heh, as someone whom tried, and failed, to fully comprehend Perl, I definately agree. To keep all of Perl in one's head is a big struggle. On the other hand, the sheer terseness is VERY impressive. swiss army chainsaw seems an accurate term. I just wish Perl 5 had a good OO system. I had hopes for Perl 6 coming out, but it doesn't seem to be coming.

    I think one has to be programming Perl for 40+ hours a week, in order for their mind to stay fresh enough in Perl to fully utilize it. I think Perl is beyond the average human's ability, much like lisp.

    1. Re:Perl can be very powerful by chromatic · · Score: 1

      I just wish Perl 5 had a good OO system.

      Try Moose.

      I think one has to be programming Perl for 40+ hours a week, in order for their mind to stay fresh enough in Perl...

      I think you have to understand the two underlying philosophical notions of Perl and know how to use the documentation to use it effectively. The book Modern Perl (I wrote it; electronic versions are free) explain those straightaway.

    2. Re:Perl can be very powerful by Laz10 · · Score: 1

      Thank you. I was not aware of your book.
      Looks good.

  34. indeed by mbkennel · · Score: 1

    me: My hovercraft (pantomimes puffing a cigarette)... is full of eels (pretends to strike a match).

    them: Ahh, matches!

    me: Ya! Ya! Ya! Ya! Do you waaaaant... do you waaaaaant... to come back to my place, bouncy bouncy?

    1. Re:indeed by h4rr4r · · Score: 1

      them: Yandelavasa grldenwi stravenka
      You: (punches)
      You: my nipples explode with delight.

  35. Syntax hardly matters...unless it's Perl, ofcourse by aaaaaaargh! · · Score: 1

    This paper is about program language syntax, and frankly speaking I think it's a shame that after so many decades of programming language research syntax is still being discussed and people constantly come up with new ways of writing down the same. Why do people invent a new syntax every time they invent a new language as if it mattered at all? Who the fuck cares about syntax?

    However, if we must talk about syntax, I'm really wondering whether there is anyone out there who honestly believes that there is anything wrong with LISP style S-expressions, which is about the simplest syntax you can get, after actually having completed several large projects in a prefix LISP-style language with standard reader. For it seems that most if not all people ranting about parentheses and s-expressions have never really used any such language. I'm fine with being wrong about this, so I'd like to know: Is there anyone on /. who has actually programmed a lot with a LISP-style language and didn't like for its syntax or had problems with its syntax? What was the problem with it? (Parentheses? Well, then use Algol-68 instead.)

    In brief, shouldn't the discussion be about programming language semantics instead? There is still lots of work to do regarding parallel programming constructs.

  36. They needed to study this? by kenh · · Score: 1

    From the paper: 'Perl users were unable to write programs more accurately than those using a language designed by chance.'

    Wow, how much time did they spend studing the premise that people working with a tool they know are able to "more accurately" write programs than users of language they don't know...

    I think I'll file this right after the study on why" holding heavy things makes my arms hurt" and "people who know where they are going tend to not rely on their GPS" studies...

    --
    Ken
  37. Meanwhile, back at the ranch... by Anonymous Coward · · Score: 0

    Getting back to the actual subject. Does this study suggest that better programming is done when the programmers are encouraged to ignore their usual logical patterns? It seems to me that this study says that for most people"more intuitive programming" means "less accurate programming".

  38. issues with the tests by Anonymous Coward · · Score: 0

    There are severe issues with their tests.

    1) Their sample size is very small. Only 18 people.
    2) They taught the people in the same order which may affect how they learn the language. Learning Quorum and then PERL might confuse the students in the syntax learning PERL causing errors. Similarly while Randomo used similar syntax the change in characters might have caused issues. Shuffling the order of how they learn the language would alleviate this possible error injection.
    3) The instructions they used might have not been the easiest to initially teach non-programming students. Using || instead of 'or' in PERL is a C-ism. The students probably would have performed better if the instruction was geared more towards using an easier structure.
    4) Only one real world language was used and one that is highly touted as flexible. A more structured language might have been better (like Python) or more languages (tcl, bash, javascript, etc.)

  39. Wait, you mean Perl *wasn't* randomly generated? by gestalt_n_pepper · · Score: 1

    C'mon. You're messin' with me aren't you?

    --
    Please do not read this sig. Thank you.
  40. Invalid test by Baldrson · · Score: 1
    Take this for example: "This is especially true, we think, considering we chose to test only the syntax in Perl that is relatively common across a number of languages (e.g., if statements, loops, functions, parameters). Considering that Java syntax, which many would arguably consider to be easier to understand than Perl, uses similar syntax, we are curious how it would perform. Given this interesting first result, we plan to test a number of additional languages using the same procedures."

    If you ask a novice to sit down and learn the tool chain it takes to write "hello world" in Java vs just about any other language, you'll be conducting a fair test that is actually relevant to novices.

  41. Novice Users? by Anonymous Coward · · Score: 0

    Why should anybody care about novice users?

  42. Not a good test and limited in scope.. by whois · · Score: 1

    They're using outdated perl syntax. And taking advantage of things you shouldn't be doing even if they're allowed. Lots of languages let you do things and caution you not to. Not saying "return" or using good variable names or declaring scope on variables isn't good.

    Regardless of how hard a language is to learn, once you "get it" you pretty much "get it" for 90% of other languages too. For instance, I can read and translate both Quorum and Randomo just by looking at the examples provided. That doesn't make the languages easy to use or better, or make perl worse, they're just different cases.

    Users have to learn the fundamentals of programming before they can program. Conditionals, loops, subroutines, Boolean logic. All of which were touched on by their sample. To me, changing "sub" or "function" to "action" doesn't make things any clearer, it just seems like you're trying to reinvent pascal. Repeat b-a times is kind of nice, but you could do the same by saying for($a..$b) { } (which arguably is less clear than the repeat statement but just as true, you want it to repeat for all integers between $a and $b)

    Also, removing parenthesis might make things clearer for simple logic but what about if d + e > 4 * x? Now you've introduced ambiguity, or at least forced the user to memorize order of operations rather than letting them be clear in their statement.

    They also acknowledge they only tested 18 people, which isn't a big enough sample set to know if they're on to something. They've essentially asked "which is easier to understand, psuedocode or badly written real languages with no comments" and the answer is pseudocode, but it's still not intuitive what the program does.

    I think they're failing to understand that people writing code now might not even understand modulus. While that's sad, it's also important to grasp what level of novice you're dealing with before training them. Visual Basic will let you write a minesweeper game without doing any math. Does that count as easier, or does math still have a place? (When I see novice programmers writing logic that doesn't use math it generally means they've unrolled what you would be doing mathematically and done a bad job of it)

    In summary, I like perl. Many people from the python/ruby/php communities have already had their fun pooping on the party so if you're going to attack the language please make sure your arguments hold some weight. There are definitely problems but syntax isn't one of them unless you run with scissors every time your parents hand them to you. Perl has very few training wheels and therefor you get people giving bad examples, but if you ignore those it just gets things done.

    1. Re:Not a good test and limited in scope.. by bytesex · · Score: 1

      I agree and I'd like to add that 'repeat a - b times' is good syntax for that particular case, but the thing is; a lot of 'for ()' cases aren't that typical. You may want to have an extra iterator, or do a step by 2, or end on multiple conditions. Things that are easy using 'for ()' and impossible using 'repeat a - b times'.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
  43. Whoa by fyngyrz · · Score: 1

    Regardless, any code that can be written in ~250 lines of C++ (as is the case in the PDF) is not a hard problem.

    Ok, sorry, but I'm just going to call nonsense on that one, lol. Either you have no idea of the scope of problems that can be addressed in 250 lines (and perhaps no idea what a c line *is*), or you're one of the world's worst c programmers.

    --
    I've fallen off your lawn, and I can't get up.
  44. thanks! by Weezul · · Score: 1

    Ain't surprising that Perl and Python win for string stuff, but :

    C beat both Java and C++. C has no string type! LOL

    --
    The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
    1. Re:thanks! by Bucky24 · · Score: 1

      True but it does have char arrays, which are not that difficult to manipulate if you know what you're doing.

      --
      All the world's a CPU, and all the men and women merely AI agents
    2. Re:thanks! by lgw · · Score: 1

      char* is C's string type - there's a library of basic string manipulation function to go with it. What most HLLs have is a good string library, with more than search and append.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    3. Re:thanks! by Unequivocal · · Score: 1

      *if you know what you're doing*

      That part of your comment really needs a little more emphasis! :)

  45. Am I wrong? by blanks · · Score: 1, Informative

    "Its syntax is very forgiving, and there are lots of ways to do most things"

    Am I the only person who sees this as one of the biggest problems with PERL? Don't get me wrong, I love choice and having options. But when you're learning a language you do not want 10 different styles of writing a function, statement, loop, whatever. Because when you are working with 10+ people you now have 1 language, 10 different ways to write in (and now 10 different ways you need to read).

    When I first started learning PERL and reading books, websites and downloading examples all the different styles of writing in PERL was the biggest problem. You can't just simply learn how to do an IF statement, you have to learn the 20+ different ways you COULD write an IF statement, since every example you will find online will be totally different.

    1. Re:Am I wrong? by Anonymous Coward · · Score: 0

      Clearly you're exagarrating. What is so terrible about writing either if foo() { bar() }; or bar() if foo()? I'm curious about those "20 ways" and "10 different ways to write".

      Perl is not simple. Perl is complex. Perl isn't easy to learn. News at 11.

      Don't expect learning a programming language properly after looking at random tutorials on the internet. There are more than enough proper (and free) Perl books around, and I can assure you, that given to 10 novices they won't start writing ifs in a completely different way from each other.

    2. Re:Am I wrong? by Anonymous Coward · · Score: 0

      You are exagerating. There are only 3 (normal) ways:

      if (COMPARISON) {STATEMENT}
      STATEMENT if (COMPARISON);
      COMPARISON && STATEMENT;

      And to be honest, only the first two are really used.

      Are there more ways? Yes, of course, but then you get to stuff like:

      COMPARISON ? (STATEMENT) : "";

      or even

      while(TRUE){
      last unless(COMPARISON);
      STATEMENT;
      last;
      }

      You can rewrite the last obscure while loop in any other language... (that has "while", or else you need goto's and other oddities)

    3. Re:Am I wrong? by Anonymous Coward · · Score: 0

      No, you're not wrong.

  46. Splat statement needed in Perl by Anonymous Coward · · Score: 0

    Since Perl was obviously generated from random components of all known computing languages this should not be surprising. Of course Larry and company could improve their score if they could agree on some regular syntax for Perl-6. Otherwise Perl-6 will be worse because they now have a new universe of nondescript languages to mix into the perl stew ... but I still think Perl needs a splat statement. Not sure what it should do, but it might be the first, and if not, it would b up2date. I discovered Perl many years ago, after a lot of years doing PL/1. Perl has become the universal computing language PL/1 wanted to be.

  47. code styles by TiggertheMad · · Score: 1

    ...which begs an interesting question, why doesn't source control include some sort of formatting neutral diff system? Imagine code that you format using style "a", because you prefer it, is uploaded to the server, which removes all formatting and saves it. I download your changes, and upon download, style "b" formatting is applied. When I look at changes, formatting differences are negated. Seems like a very useful feature.

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
    1. Re:code styles by leenks · · Score: 2

      Just enforce a formatter on commit. If the formatted code is any different from the original file, abort the commit. Git makes this kind of thing easy. It also means the repository is always in a sane state. A simple script can reformat all changed files trivially before a commit operation.

    2. Re:code styles by Anonymous Coward · · Score: 0

      I do a diff before a commit and undo any 'random' changes to white space.

      My attitude about people that go through and reformat or refactor code 'just because' is they are vandals. The people who work on a code base have mental maps of it. Those mental maps are important. When someone makes changes to the code base those mental maps are now out of date. That's what happens when you work on code, but that should be a necessary evil not a la de da.

      Topical: I can see why someone that's spent a lot of time learning Perl might want to use it. Can't see why anyone who hasn't should spend any time on it at all. Ergo when starting a new project, if you decide yes lets use Perl, you've made a horrible mistake.

    3. Re:code styles by JoeMerchant · · Score: 1

      Just enforce a formatter on commit. If the formatted code is any different from the original file, abort the commit.

      I haven't met a formatter yet that understands all the possible "best ways" to format various blocks of code, and I never will, as soon as one is created that encompasses all known formats, a new problem will come along that does not conform to the existing rules.

      Yes, _most_ code should follow consistent style, but there are some blocks of code that just shouldn't be put into a standard format (long lists of repetitive groups of two or three operations with a single variation per group come to mind at the moment, but there are others...)

    4. Re:code styles by Richy_T · · Score: 1

      Clearly, all languages should actually encode the programming to XML and save that and then the choice of display is up to the settings of the editor.

      I say that somewhat tongue-in-cheek but it's something I've considered from time to time. Having to mess with the formatting whether it be from differing company standards, different ways editors handle tabs vs spaces or simply moving code around just seems like a waste of human effort to me.

    5. Re:code styles by thoromyr · · Score: 1

      Topical: I can see why someone that's spent a lot of time learning Perl might want to use it. Can't see why anyone who hasn't should spend any time on it at all. Ergo when starting a new project, if you decide yes lets use Perl, you've made a horrible mistake.

      and yet Perl is what is used here. Anyone complaining about Python hasn't tried to write or debug Perl for half-way complex applications. Gah!

      (Just for anyone who is a Perl lover reading this: I learned Perl first and am decent coding in it. But then I was forced to use Python for a project. http://xkcd.com/353/)

  48. FYI by Anonymous Coward · · Score: 0

    Also, after more than a decade, there's finally going to be a 4th edition of the Camel book (hopefully in time for the holidays)!

  49. perl program by Anonymous Coward · · Score: 0

    sub randomlanguage()
                {
                  my $a = shift(@_);
                  my $b = shift(@_);
                  foreach my $stmt (@(shift(@_))
                              {
                                next unless ((index($c, $a) >= 0) and (index($c,reverse($a))));
                                print("valid-stmt:(\"$stmt)\");
                              }
                }

    1. Re:perl program by Anonymous Coward · · Score: 0

      syntax error at crap.pl line 5, near "@(shift"
      Can't find string terminator '"' anywhere before EOF at crap.pl line 8.

      Furthermore, you never defined $c--which would cause a compiler error under the strict pragma--so index($c,$a) == -1. Hence, your subroutine wouldn't do anything.

      Never mind the fact that statements such as "shift(@_)" are redundant (shift takes @_ as its default argument within a subroutine).

  50. Re: Not so fast by Anonymous Coward · · Score: 0

    >They claim that Perl is not significantly better than Randomo, but that's just due to the test they chose. Looking at their figure, Perl programmers outperformed >Randomo programmers in 6/6 tasks (that is, their means were greater). Using a simple sign test [wikipedia.org] on the differences between the means, the two tailed > p value is about 0.03, and the one-tailed p value (I think we're justified here having having a directional hypothesis...) is about 0.015. Both of these numbers are less > than 0.05; we are justified in saying that Perl programmers performed significantly better than Randomo programmers, in spite of what the paper says.

    Incorrect. The researchers used a repeated measures design which requires a --- repeated measures anova and a sphericity test. This is exactly what the researchers did. Sign tests aren't what you want here because they ... ya know ... don't take repeated measures into account. Shocking!

  51. What? by roc97007 · · Score: 1

    I thought Perl *was* a randomly generated programming language. I think Perl users tend to fall into two groups -- the ones who thrive on it, and the ones who get violent headaches from too extended a contact with the language. (I'm in the latter group.)

    --
    Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
  52. Odd.. by bratwiz · · Score: 0

    For a language that's considered so obtuse and that nobody seems to love, it sure does have a ton of great modules to do practically anything you can think of that needs doing. I can think of a lot of languages that only *WISH* they had such a rich toolkit to offer their proponents.

  53. The script language redneck mosh pit... by Anonymous Coward · · Score: 0

    Of course from the perspective of a Haskell programmer, this looks like a wonderful, eye pleasing, nicely choreographed beauty of a nasty-tooth-and-claw retard bare-fist clubbing.

    I imagine Perl as a redneck with a bib-and-brace overall dirty from pig farming, a straw in his mouth, large paws with sausage fingers as dirty as a pig's snout and as rough as sandpaper, wrapped around a last-century-style pitchfork and a bottle with "XXX" on it.

    And in the other corners of the pit we have PHP, which had trouble qualifying as a language at all, since it requested the usage of its own type-detection engine, and all the judges could make out was that it was a, and I quote "Somethingsomething wrapped in a huge Variant that walks like a constant and talks like a String, barely resembling a Python-style Gumby".

    Python, the language, immediately filed charges of being "massively offended and fluffing its peacock feathers with a loud gobbledygook because of there being even a slight chance of it being compared to PHP", and walked away from the pit, leaving feathers left and right.

    Finally we have "Sir" expected-to-go-down-first-and-declare-flawless-victory Ruby, seen here on the left for which the word "slow" just doesn't say it anymore.

    JavaScript's application was not accepted this year on the grounds of "actually being quite popular, used a lot, and having grown up from a horrible piece of shit to something quite-but-not-entierly-utterly-disgusting".

  54. python readability by KingAlanI · · Score: 1

    I started with Python, and I was struck by how the syntax was relatively close to natural English. Someone said it looked like BASIC, even.
    Python: Relatively easy for newbies to pick up on, while still being a full-powered general-purpose language

    --
    I listen to both RIAA and non-RIAA stuff if I like the music, tangential business/politics nonwithstanding.
  55. Python Standard: 4 Spaces! by tepples · · Score: 1

    Really, Python's problem is that both spaces and tabs are legal

    Open IDLE, Options > Configure IDLE... "Python Standard: 4 Spaces!"

    1. Re:Python Standard: 4 Spaces! by Lodragandraoidh · · Score: 1

      All my tabs are written out as 4 spaces in Emacs as well... No problemo.

      Emacs python mode allows you to manage blocks easily in python too.

      I had some experience with Fortran long ago -- which also has some bondage regarding white space (column 6 to start a statement - columns 1-5 being significant for such things as labels), no statement ending punctuation (limited to 72 characters per line maximum), and blocks denoted through indentation (only by convention - not required). Maybe that explains why I don't find find python all that difficult?

      Personally, not having to count nested ending curly braces is a godsend.

      Would I use python for everything? No. But, it has replaced anything I would do today with shell (bash, sed, awk), Perl, Java or C# for my personal needs. If I want performance for systems programming - I'll still grab C or C++ (which I could also modularly integrate with python if desired for even more flexibility - avoid premature optimisation being the watchword there).

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  56. As an entry language, maybe by damn_registrars · · Score: 1

    If their purpose was to show that good programming habits are hard to teach with Perl as a base, that makes sense because Perl is rather forgiving of things that other languages would flat out reject.

    That, however, does not on its own make Perl "bad" or even "worse" than any other language as a whole. Tragically, that seems to be the message that the summary is trying to convey here.

    Taking two programming languages - any combination of two languages - and trying to call one "good" and the other "bad" is idiotic at the very least. It is like setting a chainsaw next to a Glock and asking someone to tell you which one is bad and which one is good. Both are useful and you can't compare the two on just one dimension and expect to have meaningful results of that comparison.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  57. Corrected title: by tomhudson · · Score: 1

    Is Perl Better Than Another Randomly Generated Programming Language?

    It's great for quick and dirty - unfortunately, everything written in perl tends to look like it was done "quick and dirty." Programming "clean" perl means ignoring most of perl's features, at which point you might as well just switch to a cleaner language.

    1. Re:Corrected title: by aztracker1 · · Score: 1

      Fair enough.. PERL is great for text processing, and one-off code that doesn't need much integration. I wouldn't build a major system with it. Then again, JS being my favorite language doesn't win me points either.

      --
      Michael J. Ryan - tracker1.info
    2. Re:Corrected title: by Unequivocal · · Score: 1

      It does with me. I think JS is the future. Databases (see couch map/reduce), web apps (node.js) and front end (pure JS) will all be written in JS soon. One language to bind them all. If I had my pick I would have chosen another language but that's the one we're stuck with so better get used to it..

  58. Hypertalk! by eefsee · · Score: 1

    The paper talks about things like "repeat" being more intuitive than "for"... I wonder if the authors considered testing languages like Hypertalk or AppleScript that are purposely designed for novice use. It would be interesting to see if they work. However, my gut (very unscientific) tells me that most professionals learn to think in the syntax they adopt, and other factors come into play than this intuitiveness. These might include efficiency (or density) of the language and ease of debugging (the whitespace issue). A test like this does not say much about the usefulness of a language to someone who devotes themselves to it.

  59. quorum is wordy by Khashishi · · Score: 1

    Looking at the paper, I can see that quorum is wordy, using full words for most of its syntax. This makes it friendly to beginners. Indeed, this is what the results showed; novice programmers for whom quorum was their first language could understand it more easily than perl. But, a wordy language is annoying and inefficient for pros. The quorum example code has many more characters than the perl or randomo code, which means much more typing. A smart IDE can help to a point, but it can't completely remove the overhead of extra verbiage.

  60. nope by Anonymous Coward · · Score: 0

    mmmm no. i retarded monkeys ass could have done better than perl. nothing to see here. move along

  61. No, you're not understanding the study. by wonkavader · · Score: 1

    The study (and I don't think it represents itself correctly) was presenting code samples and telling people to learn from them how to write a program in that language.

    The participants were presented with something which looked a lot like a modern version of basic (Quorum) a random-ish programming language, and perl. The sample programs were written as best as could be written, I suppose, in that language; the Quorum samples were written like you'd expect a basic program to be written; and the perl sample programs (as shown in the PDF) were written like basic programs by someone who clearly had no idea how to write a decent perl program.

    None of the syntactic aids which perl is so rich in were used. Variables & function names were chosen like in old basic or fortran. Integers were initialized like reals. The study shows that when incompetent programmers are told how to program by incompetent programmers, it's helpful to make a programming language have a more immediately and superficially helpful syntax.

    Duh.

    If they'd given these people a book and some time, they would have certainly have written better programs in perl than in the random language. Possibly better than in Quorum, though I doubt it. People have a lot of baggage/experience with basic and the languages which derived ideas from it, so that Quorum (as presented in these code examples) would seem more natural to them. These people weren't programmers, they were people who wanted $10. A random sample of college students will find a bunch of hits on people who have used basic, and some who might have done something in java -- I suspect about 20% to 30%. But how many will have experience with a novel language like perl? One? (I am just guessing on those numbers. Notably missing from this study is any analysis of the experiences of the subjects, which would have given us some clue to those numbers, albeit with this small sample size.)

    Cobol would have been alien to them too, and the designers of this study would have tried to make it look like basic, since that's what they seem to know.

  62. perl programmers by Anonymous Coward · · Score: 0

    Perl written by a good perl programmer is easy to read. Unfortunately though bad programmers decide to write over complicated code just to confuse people and show that they are awesome because they know what it does. Thats not really the languages fault (though It could be designed to prevent it). If you see perl thats hard to read the first thing to shout is "Who the hell wrote this?".

  63. This was somewhere.. by TuomasK · · Score: 1

    If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.

    --
    The truth or interpretation..
  64. Old School Perl by reluctantjoiner · · Score: 1

    Ok, I gots to know:
    Why is $_[n] for getting the values of arguments error prone?
    Less importantly, why is &foo bad perl code?
    In this thread, I've seen these ideas presented as self evident, but this is the first time I've encountered them.

    1. Re:Old School Perl by Smallpond · · Score: 1

      $_[n] is error prone if you mix it with shift or you ever make changes to your code, since the indexes change. Typically you would either shift the arguments if there are a variable number, or get them all at once using "my ($arg1, $arg2) = @_;" There is seldom a reason to get them one by one using indexes. Also there is $_[n] = new_value; which C programmers find unsettling.

      &foo disables prototype checking and context selection. &foo(glob($baz)) is called with a list even if the prototype is sub foo($).

  65. PERL demise; greatly exaggerated by Anonymous Coward · · Score: 0

    I discovered PERL probably about 15 years ago. It reminded me in some weird ways of the basic I learned as a kid, so I picked it up almost overnight. Since then, I've learned Pascal, Java, PHP, Python, ActionScript, some Ruby, the usual suspects... but always come back to PERL. It works for everything; local, remote, applications, CGI, etc... truly my swiss army knife of languages. I have yet to run in to a problem it can't solve. Several years ago, the language started to get that "dead language" rap... many designers I worked with, would make the same comment to me, "you still use PERL? Who still uses PERL?"

    (By the way, I know you're not supposed to capitalize all the letters, but I prefer it that way for some reason.)

    Then, I went to a PERL seminar a few years back, and one of the speakers revealed some startling statistics - despite the "dead language rap", CPAN had increased in size almost 700%, and downloads of PERL had increased over 1000%... for a "dead language", it was kind of refusing to lie down. It was seemingly available EVERYWHERE by default; every web server I've ever worked on has it, and every local admin job I've taken has it already installed in-house. It works flawlessly across any platform, and it is bullet-proof reliable.

    Since then, I've invested even more time and faith in it, and I am happily anticipating PERL6. But mostly because of my faith in Larry Wall - he truly is brilliant, and an under-appreciated icon of programmers everywhere. The fact that its taking so long is slightly bothersome; but Larry is trying to get it right - and from what I've seen of PERL6, I think he's struck the perfect balance in language creation... and the integration with Parrot will make it the ultimate glue language. Long live PERL!

  66. Why do people hate on Perl, anyway? by Anonymous Coward · · Score: 0

    You can write obfuscated code in any language. Perl uses a few special variables you have to learn, but compared to say C++ templates they're not bad. (I guess very few people use and understand C++ templates, which approach looking like line noise, so it isn't as in-your-face as widely used Perl.) Perl allows in-line regular expressions, which makes programs look like line noise, but any programming language with regexes is going to look like that. It's just the Python, Java, etc don't have regexes built into the language but in libraries so it's not as obvious. But you typically use Perl for tasks that require regexes, which makes sense for them to be part of the language. I can write ugly code in any language, so Perl is no big exception, but with modules and functions you can write Perl code that looks a lot like C. For someone who uses C and Java, Perl is much easier to cognitively switch to than say Python or Ruby. And languages like Erlang or R look like their syntax was developed by space aliens using hieroglyphics. At least Perl resembles other languages I use regularly. Making the cognitive jump from say, C to JavaScript, is not fun.

  67. Really? Perl was designed "linguistically"? by Anonymous Coward · · Score: 0

    I've been hearing this meme "Perl was designed 'linguistically'" repeated for years and years as a justification for writing code that is hideous to everyone except the person who wrote it.

    What does this even mean, "Perl was designed 'linguistically'"? Show me a concrete example.

    What is this unquantified "beauty" that Perl supposedly facilitates above all else? Show me a piece of beauty that doesn't (a) doesn't depend on whitespace, and (b) doesn't rely on operators converted to English words, and (c) isn't obfuscatory Perl Golf.

  68. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  69. Poor paper on old chestnut by wdef · · Score: 1

    Comments above show this paper does not study what it purports to study and draws false conclusions based on a non-understanding of statistics. Is it my imagination or are we getting more and more crap papers like this on /.? It's so boring listening to little Perl haters. They always seem to have some chip on their shoulder as if Perl were the one language they just couldn't ever get. As if that C++ is any fun. Please, *must* I write in C++? Perl is a writer's language, if you are in the habit of using it you can write hard code [b]very[/b] fast. Brilliant prototyping, unbeaten RE/text manipulation, an unmatched repo of prewritten library code in CPAN, and a real "soul" that encourages one to have a stab at that complex regex only to discover it actually works first time. And that poetic sense that line noise is never just line noise. And finally: as great as sed and awk are, if you know a little Perl you won't need sed or awk for anything. We're all supposed to be "knocking up" everything in Python. Yawn. I'm sure Python's great and I like the built in library (no way comes close to CPAN though). But Perl has character. There are intangible things that will attract one to a language. Perl can do things simply or Perl can do things hard. There is a wealth of intellectual complexity in Perl or just pattern-obsessed autism, either way it works. Perl rocks. I suppose I should be pleased that Ruby is still fashionable. Ruby syntax is based on Perl and Larry has said that Perl OoO takes a lot from Ruby.

    1. Re:Poor paper on old chestnut by jgrahn · · Score: 1

      Comments above show this paper does not study what it purports to study and draws false conclusions based on a non-understanding of statistics. Is it my imagination or are we getting more and more crap papers like this on /.? It's so boring listening to little Perl haters. They always seem to have some chip on their shoulder as if Perl were the one language they just couldn't ever get. As if that C++ is any fun. Please, *must* I write in C++?

      Now that you mention it, it's also boring to listening to the C++ haters ...

  70. Hey, I went there... by gosand · · Score: 1

    Interesting... I found their CS department to be OK.. but I got my BS-CS back in '93 at SIU-C. Maybe the department has changed, I know the landscape of CS certainly has. But these researchers are from SIU-E, and I don't even think they had a CS department back then. I don't think you can discount the research entirely based on where it came from.

    --

    My beliefs do not require that you agree with them.

  71. Useless Analysis by Anonymous Coward · · Score: 0

    This exercise was so shallow in what it attempted to measure that the results are basically meaningless. Did the test evaluate object oriented programming? Did it address useability of code (i.e., perl modules)? Did it look at the existing repository of user contributed functions (CPAN) that allow the user to get a lot further down the road that any new language would?

    From the current CPAN page it states "the Comprehensive Perl Archive Network (CPAN) currently has 100,866 Perl modules in 23,634 distributions, written by 9,300 authors, mirrored on 269 servers". You cannot ignore CPAN if you evaluate Perl.

    After your company spends a zillion dollars on writing applications in randomly generated code, where are you going to hire experienced developers that can maintain that code? There is a heluva lot more to evaluating a language than seeing how long it takes beginning programers to turn pseudo code into working code.

  72. teaching by Anonymous Coward · · Score: 0

    This study strikes me as problematic in several ways.
    Presumably the Quorum language is meant strictly for teaching, A language "where the syntax, semantics, and API designs change in correspondence to the latest academic research and literature on programming language usability" would be a nightmare to actually use for anything.
    Given that, it seems prudent to compare it against the kind of language that is ACTUALLY used for teaching.
    I'm by no means a Perl apologist, it does what it does...but I've never heard of anyone using Perl for teaching purposes. Why not compare it to something like Pascal, which is INTENDED to teaching? Or even Python, which is built on a philosophy of simplicity? Or Java, which is still probably the most commonly taught language?

  73. Yea But...... by dudewhereismycar · · Score: 1

    Can an expert in Randomo code in Perl without knowing Perl beforehand?

  74. It's Teco, all over again by ka9dgx · · Score: 1

    It occurs to me that Perl is just the web replacing the gap left by Teco.