in reply to What do you use as a language litmus?

An interesting question.

My gut reaction is, "How easy is it to read the code?" I've just started investigating Drupal as a CMS, so that means getting into PHP. I've looked into the language before, and it seems simple enough, except without some of the groovy things that Perl does. I'm also looking into Python because my CTO mentioned that Red Hat is using it to build their distros. Again, the language reads like a simplified version of Perl.

Since you touched on IDEs, I did just want to say that I used an IDE from Borland to do development in C many years ago -- but I'm now familiar enough with the language that I use every day (Perl) that if I get a syntax error, I almost always know what the mistake is -- I don't need a visual reminder of where to look. More useful would be an OO debugger, although I'm currently quite happy with the Perl debugger -- that's probably just my machine language background speaking.

I 'get' OO -- but I've never used C++ or Java much; pure OO usually seems to be twisting reality to fit the language, rather than having the language do the acrobatics. Perl's OO layer is just that -- a layer, and not really built in. However, the hints I see occasionally about Perl6 suggest that it will be much more OO. That's OK -- as long as I can still get stuff done quickly and efficiently, I'll make the jump to Perl6.

Eventually.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Re: What do you use as a language litmus?

Replies are listed 'Best First'.
Re^2: What do you use as a language litmus?
by apotheon (Deacon) on Jun 26, 2007 at 13:45 UTC

    I think that code readability is of great importance, of course -- but that's more of a high-level goal of language choice, rather than an example of language choice criteria. For instance, one might say "no variable sigils" in answer to my question, with the explanation that the reason for that answer is to improve readability. One might also say "significant whitespace" for the same reason. Code readability is affected by a combination of such language characteristics, programming style, and the particular accent a given programmer lends to the language in his/her code.

    (Note that I make no judgments here about what effects variable name sigils and significant whitespace have on code readability. I only bring them up as examples of things people have suggested apply to code readability.)

    Regarding your commentary on OOP: Have you had a look at Ruby? Through all my encounters with object oriented programming, including the way it's accomplished in C++, Java, Perl, and Python, I tended to find that OOP was well overhyped. In Ruby, however, I have learned to love the stuff. It's by no means the only way to program, and there are times when it's probably entirely the "wrong" approach to even a high-level problem, but the object model employed by Ruby is subtly pervasive and quite consistent in a way that makes me realize that there's a lot more to OOP than I had previously thought. The problem is not that OOP isn't all that useful -- it's that most languages get OOP substantially wrong.

    With the usual caveats that I've never used Smalltalk or the CLOS, Ruby is by far the best OOP I've encountered. You may find it was worth looking into, while you wait for Perl 6. Quickness and efficient task completion are in no way hindered by the pervasiveness and universality of object orientation in Ruby.

    Speaking of which -- the ability to employ OOP techniques in a Ruby-like "everything is an object" manner is one of the things I include in my list of language litmus tests, at least when looking at a language for purposes of doing any object oriented programming.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin

        For instance, one might say "no variable sigils" in answer to my question, with the explanation that the reason for that answer is to improve readability.

      Actually, coming from my C background, Perl sigils were a change for me -- sure, * means a pointer, but apart from that C doesn't have them -- but I quite liked them. Which will be a change going to Perl6.

      And thanks for mentioning Ruby -- that's the third language that I need to look into (in my spare time) in order to stay up to date on what's happening with the new languages. It'll probably be easier for me if I can draw a big chart showing how you do certain things in each of the languages. For example, a pop in Python takes things off the *front* of an array, not the back, like Perl. Not what I expected.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds