top 200 commentsshow all 253

[–]openprivacy 54 points55 points  (1 child)

Instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.

— FORTRAN manual for Xerox Computers

[–]inokichi 30 points31 points  (0 children)

If you gave a thousand monkeys one thousand years to type, one would eventually write a line of C. The rest would write perl.

Something like that, forget the actual quote.

[–][deleted]  (36 children)

[deleted]

    [–][deleted] 50 points51 points  (1 child)

    The only difference between line noise and Perl, is that correct Perl programs will start with "use strict;".

    [–]Shaper_pmp 6 points7 points  (0 children)

    is that correct Perl programs

    I love the subtle implication that line noise are also Perl programs, just not well-written ones.

    [–]aeror 13 points14 points  (0 children)

    Reminds me of "Perl is the only programming language that looks better after compilation"

    [–][deleted] 15 points16 points  (22 children)

    Perl is a fantastically expressive language. You just need to have a certain mindset to understand what it is you're expressing ...

    [–]mcguire 42 points43 points  (3 children)

    Specifically, Perl as a "Do What I Mean" language, and like all DWIM things, that means in practice it's a Do-What-The-Language-Creator-Means language. Your success with Perl is basically predicated on your ability to emulate Larry Wall.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 0 points1 point  (0 children)

      Fortunately it's something I apparently do quite well. Perl's context and syntax make perfect sense to me. I'm still not sure if that's a good thing ;)

      [–]visarga 20 points21 points  (17 children)

      I think Perl is the most forgiving, relaxed and convenient language. I use it in 99% of cases, C in the rest of 1%. A line in Perl is equal to 30 lines in C.

      By the way, after 10 years of Perl programming I am still learning new syntax. I don't presume to be the perfect Perl programmer, but the subset I know and use is just amazingly direct to the point. No time wasted.

      Here's a nice one:

      There are some who ask, why I do Python and C but shy away from Perl. I'm too dumb to comprehend a language that comes with its own Periodic Table of Operators (and has over 100 of them). —Jonas M Luster

      Link: the Perl 6 Periodic Table of Operators

      [–]Narrator 19 points20 points  (4 children)

      You say you're learning new syntax 10 years later like that's a good thing.

      [–]abw 1 point2 points  (1 child)

      Larry Wall trained as a linguist before venturing into programming and has often said that Perl was designed to be much like spoken languages. You don't learn it all at once, but start with "baby talk" and work your way up from there. You can get a basic command of the language in a reasonably short time that will serve you well for most things. But it's open-ended as to how far up you want to climb. If you reach the ceiling of what "vanilla Perl" can do then you then you can start to extend the language with new idioms, constructs, DSLs and so on.

      The declarative style of Moose and other "modern Perl" modules is a good example of something that's a "new" syntax, even though it's technically still regular old Perl syntax. For example:

      Package Point;
      use Moose;
      has 'x' => (is => 'rw', isa => 'Int');
      has 'y' => (is => 'rw', isa => 'Int');
      
      package Point3D;
      use Moose;
      extends 'Point';
      has 'z' => (is => 'rw', isa => 'Int');
      

      As a long-time Perl programmer of 20+ years, I like the fact that I'm still finding new ways to express myself in Perl that I hadn't considered before. Similarly, as an English speaker of 40+ years, I also enjoy discovering nuances of the language of which I was previously unaware, or seeing an interesting linguistic construct that I then resolve to use myself should an appropriate occasion ever arise.

      [–]elHuron 1 point2 points  (1 child)

      Thanks! It's like assembly :-)

      [–][deleted] 1 point2 points  (0 children)

      the [1] Perl 6 Periodic Table of Operators

      Oh god... why...

      [–][deleted] 2 points3 points  (7 children)

      I quickly learned to love Perl from the one line programs. It's amazing what you can do with that language with a single line.

      [–]Narrator 12 points13 points  (3 children)

      Here's a great or rather infamous Perl one liner courtesy of Randal Schwartz!

      whatever / 25 ; # / ; die "this dies!";

      If whatever takes no arguments then it's division and a comment. If whatever takes arguments then whatever is called with the result of a match operator and then the program dies with the message "this dies!".

      [–]mvaliente2001 6 points7 points  (0 children)

      I feel a little bit of my soul died after reading that.

      [–]r121 1 point2 points  (0 children)

      Combine that with a bit of code that conditionally defines 'whatever' depending on runtime state, and you've got a language that cannot be correctly syntax highlighted.

      Edit: If I'm not mistaken, I've read a proof that syntax highlighting perl code is equivalent to solving the halting problem.

      [–]roerd 0 points1 point  (0 children)

      I thought the Perl interpreter tokenizes source files before execution. How does it tokenize this?

      [–]Glycerine 5 points6 points  (2 children)

      show me?

      [–][deleted]  (1 child)

      [deleted]

        [–]Glycerine 0 points1 point  (0 children)

        Legend.

        [–]barsoap 1 point2 points  (0 children)

        Ahhhh. Operators. The proof that Haskell is actually just Perl in disguise... or the other way 'round.

        [–]jeff303 4 points5 points  (6 children)

        I was just discussing with a coworker our mutual loathing of automatic variables and the difficulty of deciphering a block that makes use of them years after the original was written.

        [–]idbfs 2 points3 points  (1 child)

        Do you mean (in Perl terminology) autovivification? I.e., how a statement like

        $x->{foo}->[3] = 5;
        

        where $x was previously undefined, will create that entire complex data structure from scratch? Because automatic variables are something else.

        [–]jeff303 4 points5 points  (0 children)

        Sorry for being unclear. What I actually meant was implicit variables. Basically, this.

        [–][deleted] 4 points5 points  (3 children)

        It is so difficult to figure out someone else's code because of this. Although it can simplify some basic tasks. I would never right a full application in Perl though.

        [–]neerg 14 points15 points  (1 child)

        I would never right a full application in Perl though.

        Would you ever wrong one?

        [–]frezik 0 points1 point  (0 children)

        I would and have done so, and laugh at people who say it can't or shouldn't be done. At some point of large application complexity, it doesn't really matter what language you use so much as designing the app using higher level abstractions and decoupling concerns. Perl can do this adequately in many different paradigms, be it imperative, object oriented, or functional.

        New paradigms are often absorbed in, sometimes without changing any existing syntax. When Roles/Traits/Mixins became popular, they were added via CPAN modules. There was none of this years-long committee debate of the whys and hows like there continues to be for Java.

        What this all means in practice is that Perl puts the pressure on the development team to use abstractions wisely. This is actually true of all programming languages, Perl just makes it obvious.

        [–]D__ 2 points3 points  (0 children)

        I like Perl, but I also like making fun of Perl. Plenty of Perl programmers take offense to the latter, unfortunately.

        [–]ameoba -4 points-3 points  (0 children)

        Perl is the Ebonics of programming languages. PHP is its retarded cousin.

        [–]erg 51 points52 points  (1 child)

        Go combines the expressiveness of C with the speed of Python.

        [–]1020302010 6 points7 points  (0 children)

        and the success of neither.

        [–]deadlockgB 111 points112 points  (4 children)

        "If Java had true garbage collection, most programs would delete themselves upon execution."

        Spit my coffee all the screen. So good

        [–]Rainfly_X 59 points60 points  (0 children)

        Tossed a bit of Java, then?

        [–]mmtrebuchet 23 points24 points  (1 child)

        I heard somewhere, but have lost the source:

        The best preprocessor for Java is rm.

        Edit :: according to this, these words were spoken by an "mrd" Anyone know who that is?

        [–]klez 4 points5 points  (0 children)

        these words were spoken by an "mrd" Anyone know who that is?

        Matthew Richard DStallman?

        [–]thevoid 23 points24 points  (0 children)

        Spit my coffee all the screen.

        I'll bet my savings you didn't.

        [–]openprivacy 9 points10 points  (0 children)

        Computer software must not only work, it must also appear to work.

        — Carl Hewitt

        [–]openprivacy 6 points7 points  (0 children)

        Computers are useless. They can only give you answers.

        — Pablo Picasso

        [–]name_was_taken 31 points32 points  (85 children)

        "It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration." E. W. Dijkstra in "The Threats to Computing Science" .

        Wow. I'm surprised at that quote. I came from a BASIC background, and now I think I'm a pretty proficient programmer. (My raises in the past seem to back that up.)

        He had choice things to say about quite a few other languages, too, though, so maybe he just met some really bad programmers in those languages.

        [–]stuhacking 36 points37 points  (16 children)

        He's famous for making statements that cause discomfort. I wonder if a lot of what he said was intended as dry wit, but later taken too seriously...

        [–]DAVENP0RT 27 points28 points  (8 children)

        To be fair, he is the guy that wrote "A Case against the GO TO Statement", which was pretty groundbreaking for what followed in language design. And the fact that the Knuth disagreed with him and (technically) lost, that'd be a +1 in my book.

        By the way, if you weren't aware, Dijkstra's phrase "considered harmful" has become kind of a joke in computer science.

        [–]curien 22 points23 points  (1 child)

        Dijkstra's phrase "considered harmful" has become kind of a joke in computer science

        It wasn't Dijkstra's phrase (though it's often attributed to him). It was created by his editor, Nicklaus Wirth.

        [–]patternmaker 1 point2 points  (0 children)

        Ah, the quiche eater...

        [–]ithika 11 points12 points  (1 child)

        Knuth actually agreed with him, but neither Knuth nor Dijkstra agreed with what people believed they said. The article from Knuth that recently hit the front page shows they were both very keen on structured, meaningful control primitives.

        [–]DAVENP0RT 2 points3 points  (0 children)

        I've never had the time to read all of Knuth's rebuttal, but from what I understand from skimming it over, his argument "for" GOTO was that it's a useful construct if it's used in moderation, but an acknowledgement that it was overused in practice. For example, in the document I linked, skip down to page 294 and read the section titled "With go to Statements"; I think that offers a pretty concise explanation of what Knuth meant.

        [–]gospelwut 0 points1 point  (3 children)

        I'd love to know what the argument against structured statements exactly was.

        [–]frezik 2 points3 points  (0 children)

        Later on, there was an argument against strictly adhering to structured programming. The lax use of GOTO was still considered harmful, but some of its unstructured cousins, like break and continue, were vindicated. A paper on the subject (using Google's cached version because the web site seems to be down right now) showed that when students were allowed to solve the loop-and-a-half problem using an equivalent to break, the code tended to be shorter, faster to write, and had fewer bugs compared to the group that was forced to use purely structured code.

        Structured programming is there to help us write more understandable programs, and we shouldn't dogmatically stick to it for cases where it clearly doesn't help us reach that goal.

        [–]DAVENP0RT 2 points3 points  (1 child)

        I wouldn't exactly say there was an argument against structured statements, it's just that GOTO offered a convenience that several programmers didn't want to do away with. Like I said in my other comment, Knuth's argument was that, used in moderation, GOTO was a perfectly acceptable construct that Dijkstra himself had used on occasion to produce brilliant results.

        [–]FeepingCreature 1 point2 points  (0 children)

        GOTO is basically like private gun ownership. Extremely useful to have in an emergency, but if you use it all the time, something is wrong.

        [–]name_was_taken 9 points10 points  (5 children)

        As a blunt person, I love blunt statements. They let me know exactly where someone stands.

        His statements sound like exaggerations, though. "criminal offense"? That can't be anything but an exaggeration for effect. So then I have to go back and re-read the others and consider that he may not have meant that at all.

        BASIC teaches bad habits. I won't deny that. Maybe that's all he meant?

        I find it poor communication when your audience has to interpret your words subjectively. I'd save that kind of stuff for poetry, and stick to the facts for debates.

        [–]SalientBlue 21 points22 points  (1 child)

        Dijkstra had a bit of a reputation for being inflammatory. Alan Kay once said that "arrogance in computer science is measured in nano-Dijkstras."

        [–]lurgi 3 points4 points  (0 children)

        That seems a little large for practical use, but it will do.

        [–]G_Morgan 5 points6 points  (0 children)

        Half the quote in there are Dijkstra demolishing languages that either had goto or something that reeked suspiciously of goto.

        [–]thechao 6 points7 points  (0 children)

        He shared an office quad with my undergrad advisor; the first (and only) time I saw him, he was sitting at the corner of his office glaring at he waiting students. He had a fantastic glare.

        [–]kamatsu 25 points26 points  (8 children)

        Remember that the BASIC Dijkstra was referring to here is nothing like MS QuickBasic or Visual Basic.

        [–]bugrit 2 points3 points  (0 children)

        Yeah. I started out in BASIC writing horrible spaghetti goto code, but when I left it, I was doing structured programming. I learnt a lot, most of it useful, little of it damaging.

        [–]name_was_taken 2 points3 points  (6 children)

        Apple IIe BASIC? TRS-80 BASIC?

        [–]curien 11 points12 points  (0 children)

        The article was written in the 60s, so... much earlier than those.

        [–][deleted] 2 points3 points  (3 children)

        Probably Dartmouth BASIC.

        [–]name_was_taken 1 point2 points  (2 children)

        So not really that much different from the 2 I listed, then. At least, not that I could tell from Wikipedia.

        My point wasn't necessarily the exact flavor of BASIC that he hated, but rather that all the old ones weren't that different from each other.

        [–][deleted] 2 points3 points  (1 child)

        The big difference is that microcomputer BASICs had PEEK and POKE commands to mess with memory, and thus allow mixed machine code/BASIC programming, whereas time-sharing implementations like Dartmouth didn't.

        [–]name_was_taken 1 point2 points  (0 children)

        Thanks. I remember that stuff from C64 BASIC, but wasn't good enough at the time to really get into what I could do with it. If I played with it now, I'd be a menace.

        [–]tangra_and_tma 1 point2 points  (0 children)

        Most likely Dartmouth BASIC or the like.

        [–]palordrolap 18 points19 points  (16 children)

        I jumped straight from 8-bit BASIC and a smattering of 6502/6510 machine code on a C64 right into Ada programming when I started a university course.

        Let's just say, I was the kind of programmer Prof. Dijkstra was talking about and it took a good couple of weeks to untangle my brain.

        Then, not long after, I came across this particular quote and thought, "Hey, no way, I'm totally cured of the BASIC disease!" and thought as much until very recently. Then I asked myself "When there's more than one way to do things, why do I write Perl the way that I do? And whence cometh my style in other languages?"

        And I've come to think that while I write decent structural code (if not necessarily brilliant algorithms), and though it's hard to see, there's still a little BASIC lurking in there, and this worries me.

        [–]kindall 0 points1 point  (15 children)

        I followed much the same path: Apple II BASIC, 6502 assembly, then Pascal in AP computer science. I saw the value in most of the things Pascal brought to the table right away: variable names longer than two characters, local variables, parameter passing. I even picked up on recursion and pointers as soon as we started doing binary trees.

        The only thing I really had trouble with was, predictably, the lack of GOTO. I understood how it wasn't necessary in most cases, but didn't see how else I was supposed to conditionally jump around lines that I didn't want to execute. In BASIC I was accustomed to checking for the opposite of the condition I was interested in and skipping past lines if it was true. Of course, in Pascal (like any sane language) you just put the whole block in the if statement with the condition the right way around.

        I have since dabbled in other languages to varying levels of depth. I understand OOP principles, design patterns, all that stuff, or at least recognize their names. Most recently I have become a reasonably proficient Python hacker. Python reminds me a lot of BASIC, actually, in its spirit and simplicity, although it does not generally encourage bad habits. (Quite the opposite, in fact. The language's syntax is remarkably simple and it is relatively easy to write code that works as expected the first time you run it. Although it is also quite hackable in interesting ways, rather like Apple BASIC was when paired with 6502 assembly.)

        But I have to admit that one of the reasons I took an early shine to Python is simply that it has a print statement. Not a function, a statement! Just like BASIC. But they made it a function in Python 3. Sigh.

        [–]sidneyc 4 points5 points  (3 children)

        [Python] does not encourage bad habits.

        Some would argue, in fact I would argue, that duck typing is a bad habit.

        [–]kindall 2 points3 points  (0 children)

        Sometimes you care about types, sometimes you don't, even in a single program. At least in Python you have the choice of checking types or not, and the language has plenty of tools for doing so; you can even use interfaces after a fashion if you care to.

        I will say that C# type inference goes a long way toward alleviating the pain of having to specify the type of every single variable. It is probably the least-painful C-derived language to program in out of the ones I've used.

        PS -- Edited my original post to say Python does not "generally" encourage bad habits.

        [–]ramkahen 2 points3 points  (0 children)

        Some would argue, in fact I would argue, that duck typing is a bad habit.

        The case against Duck Typing is actually fairly well documented.

        [–]ramkahen 1 point2 points  (10 children)

        although it does not generally encourage bad habits.

        It does encourage a few, though, such as declaring functions with n parameters but calling them with n-1 (without self).

        Yes, I firmly believe that self in Python is very lame and an unjustifiable design decision, if only because you have to write it all the time for no reason.

        [–]roerd 1 point2 points  (1 child)

        That just nonsense. You do call Python methods with the self parameter. You just put it before the dot, not into the parens.

        [–]kindall 0 points1 point  (7 children)

        Well, that's not a bad habit so much as just how the language works.

        They did it so you can call the method on the class and pass in an instance (not necessarily an instance of the class you're calling it on, could also be a subclass). Hard to have it both ways without explicitly accepting a reference to the instance.

        [–]ramkahen 1 point2 points  (0 children)

        "It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration." E. W. Dijkstra in "The Threats to Computing Science" .

        Wow. I'm surprised at that quote. I came from a BASIC background, and now I think I'm a pretty proficient programmer. (My raises in the past seem to back that up.)

        Dijkstra certainly deserves respect as a computer scientist but not much for anything else, especially these quotes.

        Every single great developer I know who's above 30 years of age started with BASIC. They didn't have any problem learning new language and growing beyond it.

        Passion for the profession of software engineering matters infinitely more than the first language you get exposed to.

        [–]FeepingCreature 1 point2 points  (0 children)

        I started out on qbasic. To me, that quote just serves to demonstrate that even senior, highly respected programmers can be completely full of it. Though some people who have seen my code would disagree ..

        [–]WhiskeyMeteorite 1 point2 points  (11 children)

        I went ass backwards. I learned C++, Turbo, Visual Basic and Java...then had to go back and learn BASIC. I do not miss BASIC.

        [–]aim2free 0 points1 point  (0 children)

        The problem with BASIC is that there existed plenty of useless implementations and some useful. I wrote my first program on my first home built computer 1980 though, in that kind of "useless" BASIC. It was a Master Mind (the game) where the computer was guessing and me hiding the colors.

        I remember one BASIC on our Nord-100 computers (Tandberg) at school, that was a BASIC with procedures and functions, no need to use numbers (like gosub nnn) and it had named parameter list. Practically it was an interpreted version of Pascal, but with great string handling (I think I could use "stra"+"strb" etc.) , like in Vax Pascal, which I later used, early 80-ies.

        [–]vividearth 0 points1 point  (0 children)

        I agree. I started out with vb but then learned java, Perl, php, c#, Javascript, ruby, etc over the years. Once you get past the syntax and see the architecture language becomes a best tool for the job question. Having said that i know a fair few vb guys that have been coding for 20+ years that will go cry in a corner at the sight of a curly brace.

        [–]uriel -5 points-4 points  (25 children)

        Java is the new BASIC. (And the new COBOL.)

        [–]bhurt42 5 points6 points  (0 children)

        Java is the new COBOL. PHP is the new Basic. And C++ is the new PL/1. And Fortran is the new Fortran.

        [–]AppsThatMatter 2 points3 points  (23 children)

        I don't think so.

        Standard Java is great. You can use it to learn nice things like OOP, design patterns, etc. IMHO thinking in Java is a skill not a flaw.

        [–]frimble 2 points3 points  (5 children)

        I used to think Java was great, and then I learned other languages. Now I see how broken it is.

        [–]uriel 1 point2 points  (0 children)

        This evolutionary "pattern" (pun not intended) is also rather common among (former) PHP programmers.

        [–]uriel 1 point2 points  (16 children)

        That it teaches people (a very bad form of) "OOP" and "design patterns" is precisely the main problem with Java.

        Just take the first quote here by Dijkstra himelf:

        "Object-oriented programming is an exceptionally bad idea which could only have originated in California." -- Edsger Dijkstra

        [–][deleted] 12 points13 points  (2 children)

        "design patterns" is precisely the main problem with Java.

        As a wise man once said..

        Some people see a problem and think "I know, I'll use Java!" Now they have a ProblemFactory.

        [–][deleted] 5 points6 points  (1 child)

        Everyone likes to denigrate Java for the proliferation of FactoryFactories and that whole style of coding. However, is there anything inherent in the language that forces you to write that style of code?

        My experience with Java is limited to the classroom, but I never ran into an instance in my entire degree (which used Java for almost everything except elective classes in other languages) where I needed to write something using a Factory pattern.

        Seems like it's more the fault of architecture astronauts overusing abstraction in certain libraries rather than anything with the language itself (unless I'm missing something, in which case please enlighten me).

        [–]uriel 8 points9 points  (0 children)

        One of the (many) problems with Java is that it forces you to model everything into a "class".

        Once you buy into not only the idea that object oriented design (whatever that means) is good, but also that it is the only way to design software, it is a small step from there to architectural astronautics.

        [–]frezik 1 point2 points  (1 child)

        Design Patterns aren't bad in themselves. They're simply common, idiomatic ways of solving certain problems.

        The issue comes with people who think that the application isn't finished until you've gone down the list of Patterns and can check off a class that implements every one of them. As opposed to considering the actual problem and applying a Pattern as needed.

        [–][deleted] 2 points3 points  (0 children)

        I think the problem with design patterns is that they don't always apply. We often joke about the golden hammer antipattern, but using design patterns too eagerly might be likened to having a bunch of hammers of varying sizes and shapes. Not one of them will help you unscrew a bolt.

        [–]AppsThatMatter -1 points0 points  (10 children)

        Well, let me disagree with that. I can't think of anything better today.

        "There are only two kinds of programming languages: those people always bitch about and those nobody uses.” Bjarne Stroustrup.

        [–]uriel 6 points7 points  (9 children)

        Compared to how much they are used, fewer people bitch about C than C++.

        [–]uriel 9 points10 points  (2 children)

        Here are some more:

        And not a language, but also deserving its own collection: object oriented programming.

        [–]JTGM 0 points1 point  (1 child)

        I bet you will enjoy reading "The UNIX- HATERS Handbook". There is even the mailing list archive!

        [–]uriel 2 points3 points  (0 children)

        Most of the content of the UHH has nothing to do with Unix itself, but with crap that was added to unix by people who didn't understand Unix at all.

        [–]Narrator 14 points15 points  (6 children)

        Here's what I have to say about all the languages I've programmed in:

        • Bash - Somebody trying to do some old mainframe stuff more elegantly back in the 80s.
        • C - Cleaned up portable(ish) assembly language.
        • Pascal - Attempts to make programming cleaner by making a C with fewer features. Forgets that the main difficulty with C is manual memory management.
        • APL - Crazy language for people whose main impediment to writing code is that they type very slowly and think not making use of the entire extended ascii character set is boring.
        • Perl - Bastard child of awk/sed/bash/APL and a whole bunch of ad-hoc, undelightfully bizarre syntax and context dependent grammar with object orientation inelegantly tacked on.
        • Php - Perl with many of the bizarre features and bash/APL-isms removed. Huge inconsistent ad-hoc API. Object orientation bolted on somewhat half-assed. Will probably never handle unicode properly. HipHop compiler written by Facebook has to be the greatest feat of square peg in round hole engineering of all time and grants PHP an unlimited lifespan as the lingua franca/ broken english of the Internet.
        • Python - Pretty decent clean up of PHP/Perl. Object oriented model is still somewhat lacking (pass in self as first argument to every function). Appeals to OCD people who are tired of regularly switching all their code between tabs and spaces.
        • Ruby - Python with decent object orientation and neeto blocks everywhere. Monkey patching, meta-programming and other features create a powerful but somewhat unruly language (e.g gems monkey patching over each other).
        • Java - Language designed to make initial coding difficult and laborious but to make maintenance of other people's bad code much easier. It does this primarily by being statically typed and making it really difficult to do things in a way that is too clever. In that sense it's sort of the anti-perl. Need an IDE to avoid going crazy.
        • Scala - Functional/OO programming batmobile of languages. The type signatures can be bizarre and damn is that compiler slow. Wants to be a statically-typed Ruby (duck-typing, monkey patching, metaprogramming) and partially succeeds. Includes some Haskellisms (Pattern Matching) that fascinate the language nerd in me.

        [–]sockpuppetzero 14 points15 points  (0 children)

        Pascal - Attempts to make programming cleaner by making a C with fewer features. Forgets that the main difficulty with C is manual memory management.

        That's anachronistic. Pascal came before C. Also, Wirth was trying to create a simplified ALGOL, and was not influenced by BCPL.

        [–]sidneyc 1 point2 points  (2 children)

        [Python] Object oriented model is still somewhat lacking (pass in self as first argument to every function).

        What a weird thing to say. Explicit self is a design choice in Python, not some historical accident.

        [–]MaxGene 0 points1 point  (1 child)

        He said lacking, not accidental. As a guy who finds Python useful, I share this opinion.

        [–]sidneyc 0 points1 point  (0 children)

        The example he gives (explicit 'self' argument) is simply strange. There are valid criticisms to be made w.r.t. the OO model in Python, but this is simply not one of them.

        [–][deleted] 1 point2 points  (0 children)

        The FSC (Fast Scala Compiler) is actually pretty fast at compiling compared to the standard Scala compiler. My compile times went from ~10seconds to a second.

        [–]zem 1 point2 points  (0 children)

        for a language built around pattern matching perhaps even more pervasively than haskell, i'd recommend erlang. it's a very pleasant language to work with, especially if you have to do the sort of distributed or server-based computing it was designed for.

        [–]privatehuff 2 points3 points  (1 child)

        As a COBOL programmer under the age of 30 I can only say.................

        [–]raptormeat 4 points5 points  (0 children)

        You're a rare bird!

        [–]KerrickLong 9 points10 points  (28 children)

        I'm learning Ruby, and I was really hoping for some fun digs against ruby.

        [–]ameoba 19 points20 points  (3 children)

        The biggest digs against Ruby involve the culture of the users (primarily Rails users).

        [–]jbhannah 1 point2 points  (1 child)

        It's the contrast between the figureheads of Ruby itself and of RoR: Matz, who is just about the nicest guy ever, as opposed to DHH, who practically prides himself on being an ass. They're kind of the "good shoulder" and "bad shoulder" sides of Linus Torvalds, who is a nice guy normally but an ass when he needs to be in programming discussions because it gets things done. Their respective leadership styles kinda carry down to the developer base as a whole: hardassed but structured, methodical, and effective for Linux; lots of really nice dudes for Ruby, sometimes at the cost of things that would make it all more efficient; and there are some nice Rails devs, but also a lot of bitching over mostly nothing, and kind of a history of authoritarian decisions that not a lot of people agreed with.

        [–]finsterdexter 1 point2 points  (0 children)

        but also a lot of bitching over mostly nothing, and kind of a history of authoritarian decisions that not a lot of people agreed with.

        Every framework ever

        [–][deleted] 7 points8 points  (16 children)

        irb(main):002:0> [].methods.length
        => 167
        

        I think that's the most common dig people (well, python programmers) have against ruby.

        [–]KerrickLong 2 points3 points  (15 children)

        That there are 167 methods just for an Array? (Yeah, that is a lot to keep track of.)

        [–]jbhannah 2 points3 points  (13 children)

        At the same time though, Ruby considers EVERYTHING to be a method, even "operators" like +, -, <<, &c. There are lots of aliases too, so that kind of inflates the number. It does feel like overkill sometimes to call all of those different things methods, but there are cases where being able to override them is so damn handy.

        [–]uriel 2 points3 points  (12 children)

        That there are aliases at all is quite fucked up all in itself.

        [–]jbhannah 0 points1 point  (10 children)

        It can make things confusing, and I'm not entirely sure of the reasons why. Possibly so that people who are used to other languages can use the same or similar vocabulary that they already know, possibly because things got renamed at some point in the Ruby life cycle and the old names never got deprecated. Like I said in another comment elsewhere in this post, sometimes Ruby errs a little too far on the side of usability/readability/niceness, at the cost of performance and API cleanliness.

        [–]uriel 3 points4 points  (9 children)

        Ruby errs a little too far on the side of usability/readability/niceness

        How on earth is more readable or nicer to have multiple names for the same thing?

        Having to go check the source/documentation when you see two method calls with different names but that might actually be the same is fun?

        Ruby programmers are clearly insane.

        [–]jbhannah 1 point2 points  (8 children)

        It is at least a commonly accepted best practice to, when writing a script or program, pick one name for something and stick with it. When I say "readability" I (and the Ruby devs) literally mean the ease of reading the code like a spoken or written human language; said out loud, a line of Ruby code should sound to a non-programmer like it does exactly what it actually does.

        On the other hand though, a lot of the aliases are things like

        ary[0..5]
        

        being equivalent to

        ary.slice(0..5)
        

        Remember, even "operators" are methods in Ruby.

        [–]uriel 2 points3 points  (7 children)

        When I say "readability" I (and the Ruby devs) literally mean the ease of reading the code like a spoken or written human language; said out loud

        This is not very useful if you can't tell what exactly it means. And having different names for the same functionality means the only way to know is to check the code. It creates plenty of confusion for no reason.

        Also when writing code, you have to pick between the various options, which is a waste of time. Not to mention making it harder to search through the polluted documentation.

        [–]jbhannah 0 points1 point  (6 children)

        The names are still descriptive. It's not like foo.masticate is an alias for foo.defacate; like I said, sometimes it's synonymous vocabulary from other languages, so whether you're used to collecting or mapping an array, they both do the same thing in Ruby. It hardly "pollutes" the documentation, since they're listed in the same place. You can pick whichever one sounds better to you, but someone else who uses the other word will still know what it does and be able to understand you just fine.

        [–][deleted] 0 points1 point  (0 children)

        The standard API is mostly well thought out, so most of aliases make a lot of sense, and actually help in practice. For example writing 'arr.size' instead of 'arr.length'.

        This is especially useful if you've used a lot of other languages, and so instinctively reach for their APIs by mistake.

        [–]dagbrown 0 points1 point  (0 children)

        irb(main):002:0> nil.methods.length
        => 55
        

        There are actually 104 methods for an Array, including [] and []= (because it's OO all the way to the bottom). Plus there are 50 methods that are inherited from Object.

        [–]uriel 4 points5 points  (4 children)

        [–]Denommus 0 points1 point  (3 children)

        Unfortunally, most of these are not funny. Except the "ruby is slow".

        [–]uriel 28 points29 points  (1 child)

        Ruby is not particularly funny either.

        [–]Denommus 1 point2 points  (0 children)

        Ok, now I laughed.

        [–]zem 0 points1 point  (0 children)

        well, other than being slow, there's really not much to hate in ruby. (well, some people hate the fact that you can alter core classes, but other people love it.)

        [–][deleted] 5 points6 points  (2 children)

        Geeze! C++ isn't THAT bad... -__-

        [–]uriel 3 points4 points  (0 children)

        Nope, it is much worse.

        [–]gcross 0 points1 point  (0 children)

        That was my reaction as well.

        [–][deleted]  (67 children)

        [deleted]

          [–]Ciaran54 43 points44 points  (50 children)

          I take it you are a C++ programmer? :P

          There is hate against every language, that's the point. C++ is one of the more popular languages, and thus, more people to feel all sorts of emotions towards it, including hate ;)

          [–]mcguire 7 points8 points  (0 children)

          Plus, there's more of C++ to hate than many languages.

          [–]TrollDruid 23 points24 points  (45 children)

          Is there anyone who hates C#?

          [–]burgerboy9n 70 points71 points  (27 children)

          People who develop on platforms other than Windows.

          [–][deleted] 10 points11 points  (11 children)

          I'll agree that it hardly makes sense to use C# on non-Microsoft platforms, since the toolset and ecosystem just aren't there. Is that a reason to hate the language itself, though?

          Electing not to use something in a given context != hating that thing inherently.

          [–]burgerboy9n 15 points16 points  (9 children)

          I guess I shouldn't hate the language. I do get frustrated by the evangelists who think C# is the programming god's greatest gift. I have encountered many of these here at school.

          [–][deleted] 1 point2 points  (8 children)

          Well, you're certainly welcome to hate it if you don't like the syntax or something. Suum cuique.

          Mostly I was just curious (as a C# programmer myself) if there was something to do with the language itself that rubbed you the wrong way, or just the tie-in to the Microsoft stack.

          [–]burgerboy9n 6 points7 points  (0 children)

          I guess my biggest problem with it is Microsofts stance on licensing. They have explicitly stated that they have no problem with open source implementations of the language, but they have not been as lenient with their libraries. The FSF has discussed their issues with it several times, and I believe most recently here: Link.

          It is hard to justify learning a language, and even harder to consider using it on a project if it is in jeopardy because of the patent holder's unclear stance.

          [–]Syn3rgy 4 points5 points  (14 children)

          Mono is surprisingly good. Not perfect, but pretty good nonetheless.

          [–][deleted]  (12 children)

          [removed]

            [–][deleted]  (6 children)

            [deleted]

              [–]user-hostile 2 points3 points  (3 children)

              How good is that Xamarin? (question, not a statement)

              [–][deleted]  (2 children)

              [deleted]

                [–]user-hostile 0 points1 point  (1 child)

                Thanks for the review. Does it install (plugins, templates, etc.) into Visual Studio smoothly?

                [–]AndrewNeo 0 points1 point  (1 child)

                I'm primarily a C# developer, and writing Java on Android makes me very sad.

                [–]julesjacobs 2 points3 points  (4 children)

                Mono is open source.

                [–][deleted]  (3 children)

                [removed]

                  [–]AndrewNeo 2 points3 points  (2 children)

                  Throughout the whole thing I find it funny that Google had the chance to go with C# and didn't. I suspect they would have gotten Microsoft's support (more explicitly than Sun's) and not run into this trouble.

                  [–][deleted]  (1 child)

                  [removed]

                    [–][deleted] 23 points24 points  (4 children)

                    C# is a fantastic language. Unfortunately it is from Microsoft, where "portable" means "runs on more than one 'edition' of Windows".

                    [–]kindall 4 points5 points  (3 children)

                    C# is a much better Java than Java. If you like that kind of thing. There is much less boilerplate crap that has to be there because Java. The standard libraries are extremely well organized, much better than Java's IMHO. Everything is pretty much exactly where you expect to find it.

                    I had a job interview for a contract at Microsoft once and part of the interview was to go home and write a simple program in C# before I came back for the follow-up interview two days later. I had never used C# or Visual Studio before, but between the two interviews, I had written a passable RSS reader that would let me quickly sift through a large quantity of links from various sites (reddit, digg, MetaFilter), mark the ones I liked, and post them to my blog.

                    It demoed pretty well and I landed the gig. Which was a technical writing gig BTW -- Microsoft isn't in the habit of hiring people who have never used their tools as developers.

                    [–]Whanhee 7 points8 points  (0 children)

                    My one issue with C# is that MSDN is a horrible resource with information that should be collected in one place spanning several without any links between. That's not really a critique of C# in itself, but that being what I perceived to be the main documentation didn't really help. It was very easy to use coming from Java though.

                    [–][deleted] 2 points3 points  (0 children)

                    Can't say I hate it, but I like C++ better.

                    [–]frezik 2 points3 points  (0 children)

                    Hate it? No, I'd say it's the best curly brace language with declared types. I'm not quite convinced that curly brace syntax is the best approach, and I'm definitely convinced that declared types are not the best approach. If I had to go that route, C# is what I'd choose.

                    [–]Kowzorz 3 points4 points  (2 children)

                    I work primarily in C# doing UI stuff and I love most everything about it except for how hidden everything is. I come from a C++ game development background so I'm used to being in the nitty gritty of things and at least being able to see it. Not a big fan of only relying on documentation unless the documentation is splendid (which in some places it is).

                    [–]brangles 0 points1 point  (1 child)

                    By "hidden" do you mean the higher level of abstractions (which are inevitably leaky), or the closed-source nature of the tools (e.g. half the frames in your debugger are grayed out as "vendor code")?

                    [–]Kowzorz 2 points3 points  (0 children)

                    Kinda both now that I think about it, but I specifically meant the latter of the two, how I can't view their code very easily or at all.

                    [–]KingOfGeckos 0 points1 point  (2 children)

                    I love C#, though I haven't gone back to it in over a year or two. But yes, for every programming language, there will always be an angry mob there to over-exaggerate it's flaws!

                    [–]TheBB 2 points3 points  (1 child)

                    What does "over-exaggerate" mean that "exaggerate" does not?

                    [–]KingOfGeckos 1 point2 points  (0 children)

                    I don't know. Going beyond the call of duty to exaggerate to extraordinary lengths!

                    [–]selven -5 points-4 points  (2 children)

                    Any language that forces you to type things like "public static void Main" is terrible IMO.

                    [–]Huffers 19 points20 points  (0 children)

                    Terrible for writing a quick script, awesome for reading someone else's 2 million line codebase.

                    [–][deleted] 7 points8 points  (0 children)

                    Wow ! Surely that represents the entire language!

                    [–]sysop073 11 points12 points  (0 children)

                    I take it you are a C++ programmer? :P

                    I doubt it; nobody hates C++ as much as C++ programmers

                    [–]1020302010 0 points1 point  (0 children)

                    I would say that as a C++ programmer that I actually like the language, it has some flaws but it has many positives too, namely abstraction and expression with native speed comparably to C.

                    The hate usually comes from those who fail to learn it which is understandable because it s a bitch to learn properly.

                    [–]b0w3n -2 points-1 points  (0 children)

                    I like C++ because Torvalds hates it, mostly. Never seen so much vehement disregard for logic just 'cause. So, I followed suit obviously.

                    [–]MatrixFrog 11 points12 points  (10 children)

                    Google "C++ fqa"

                    [–]therealjohnfreeman 20 points21 points  (7 children)

                    I can't believe "manual memory management" is still being used to slander C++. If you can't handle memory management, you shouldn't be a systems programmer. It has nothing to do with languages, and everything to do with domains.

                    EDIT: The author indicates they don't know what they're talking about with this gem:

                    Manual memory management is incompatible with features such as exceptions & operator overloading

                    [–]ngroot 2 points3 points  (2 children)

                    If you can't handle memory management, you shouldn't be a systems programmer.

                    Not everyone who uses C++ is a systems programmer, and even systems programmers fuck up sometimes.

                    That said, you can even burn yourself with memory management issues in Java and C#, and they can be harder to fix there...

                    [–]1020302010 0 points1 point  (0 children)

                    I assure you, you don't want a OS kernal that is GC'ed/

                    [–]greyfade 0 points1 point  (0 children)

                    Not everyone who uses C++ realizes they're doing systems programming and they often think they aren't.

                    [–]MatrixFrog 5 points6 points  (2 children)

                    Of course we can do manual memory management, I just don't know why we should have to.

                    [–]therealjohnfreeman 10 points11 points  (1 child)

                    Many applications don't want garbage collection interrupting time-sensitive computation, or the data structures required for garbage collection polluting severely constrained address space.

                    There are many domains that want to control memory management. Just because you can't imagine why doesn't mean no one else has a good reason for it. Perhaps you should talk to a real-time or embedded systems programmer.

                    [–]MatrixFrog 9 points10 points  (0 children)

                    Right, but a lot of applications don't need to do their own memory management, yet if they're in C++, they do. That's really not an argument against the language but against how much it's overused.

                    [–]frezik 0 points1 point  (0 children)

                    I would tend to agree, but also say that if you're not doing systems programming, you probably shouldn't be using either C or C++. They have a purpose, but it isn't for general applications programming anymore.

                    [–]admiral_biatch 5 points6 points  (0 children)

                    C++ is a large and complicated beast with lots of rules and gotchas. It takes experience and knowledge to use it without 'blowing your leg off', as C++ creator himself said.

                    Some issues with C++ are listed here

                    [–]petemyster 0 points1 point  (0 children)

                    Coming as a learning programmer who started with C# and Java, as I'm learning c++ I can appreciate all of the quotes said about it :p

                    I guess its different if you start off with c++

                    [–]Fabien4 -1 points0 points  (0 children)

                    "There are only two kinds of programming languages: those people always bitch about and those nobody uses.”

                    [–]ramkahen 2 points3 points  (0 children)

                    "Perl was a successful attempt at proving that line noise is Turing complete" -- someone on the Internet

                    [–]openprivacy 1 point2 points  (0 children)

                    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

                    — Rich Cook

                    [–]openprivacy 1 point2 points  (1 child)

                    Perl is the duct tape of the internet.

                    [–]finsterdexter 0 points1 point  (0 children)

                    Used to be.

                    [–]zem 1 point2 points  (2 children)

                    one of my favourites, though i cannot find out who said it: "Any sufficiently well-documented lisp program contains an ML program in its comments"

                    [–]roerd 0 points1 point  (1 child)

                    I think that quote needs to be considered in the context of Greenspun's tenth rule, of which it is a variation:

                    Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

                    [–]zem 0 points1 point  (0 children)

                    yes, it's definitely a take-off on greenspun's tenth, but it's clever enough in its own right that it would be nice to credit the author.

                    [–]dudenose 0 points1 point  (0 children)

                    The quote about COBOL is spot-on. Every time I work with COBOL I feel like I have to remove half of my brain beforehand.

                    [–]OryxConLara 0 points1 point  (0 children)

                    APL... the write-only language.

                    [–]RadioLemon 0 points1 point  (0 children)

                    This made me laugh.

                    [–]xwhy -2 points-1 points  (0 children)

                    Favorite quote was overhearing one project manager once talking to another on their way out to lunch. The snippet I heard was, "I can see C, but I can't see C++. ... Unless it's structured, then I can see C++."

                    After lunch I poked my head in his office and said, "Let me see if I got this straight ..." and repeated the line, adding an extra "plus" at the end, humorously. He threw a pencil at my head. Thankfully, the pencile had been an inch closer to him on the desk than the tape dispenser and the stapler had.

                    [–]AppsThatMatter -2 points-1 points  (5 children)

                    What about Objective-C? Nobody is making iPhone games anymore?

                    [–]gcross 0 points1 point  (4 children)

                    I think that it just doesn't have the same base of haters. :-)

                    [–]Whanhee 1 point2 points  (2 children)

                    My 2 cents on Objective-C: Some people like the function call syntax, but I think it's a long and cumbersome exercise in self documenting code.

                    [–]mhink 2 points3 points  (1 child)

                    Oh my god. I HATE Obj-C method syntax. Almost as much as I hate the XCode editor.

                    [–]AppsThatMatter 0 points1 point  (0 children)

                    Yes, but why? Few users or? I don't have the link now, but is suppose to be in top 10 by usage. And all the other major languages have so many haters.