4 ms·
Language keywords: Ruby ~40 Python ~40 Java ~50 Perl ~1800 Perl can have all the community support, packages, and testing that it wants, but I dislike program
by danpalmer 14y ago
Language keywords:
Ruby ~40
Python ~40
Java ~50
Perl ~1800
Perl can have all the community support, packages, and testing that it wants, but I dislike programming in it and find it difficult to code in. This is not because I have only ever done Ruby or Javascript, I would consider my strongest languages to be Objective-C and Java, I have used C quite a lot, I know what I am doing with programming languages. I just dislike Perl.
Did you know there is a Perl package that will catch references to undefined symbols and fuzzy match them to the closest it can find in the current scope. To me, that seems to be the marker for the general quality of the code.
- chromatic 14y agoWhere did you get the ~1800 figure? Is it possible you're thinking of PHP? To me, that seems to be the marker for the general quality of the code. There's also a module which allows you to program in Latin. Does that mean that every Perl programmer eventually has to live in Europe?
- berntb 14y agoA karma 16 account with some fast and wrong insults. It is old enough not to be green colored. Yet another language war troll account on HN. Edit: I'd guess the troll's main account votes the troll posts up... maybe a heuristic can be made for the HN algorithm?
- whateverer 14y agoI think it's much more likely that it's just somebody who dislikes a language and stated it in a smartass way, as programmers are wont to do.
- bloblaw 14y agoThis sounds wrong...so I thought I'd see what Notepad++ has built into its syntax highlighting lexer (langs.model.xml): * ~ 35, Python * ~ 53, Java * ~ 59, Ruby * ~189, Bash * ~253, Perl <===== * ~928, PHP Perl has a higher keyword count than Ruby or Python, but remember Perl's keyword list includes its core socket/network library (which Ruby/Python/Java don't contain in theirs...according to Notepad++).
- adrianhoward 14y agoPerl has a higher keyword count than Ruby or Python, but remember Perl's keyword list includes its core socket/network library (which Ruby/Python/Java don't contain in theirs...according to Notepad++). It's a language design choice too - Perl very deliberately has different keywords for different data types. So we have "+" for numbers and "." for strings. ">" for numbers, "gt" for strings - and so on. The argument being that what you spend in having to remember multiple keywords you gain back in increased code clarity.
- draegtun 14y ago> but remember Perl's keyword list includes its core socket/network library And it is being mooted that these will be moved out into core modules at some point (ref: http://lwn.net/Articles/458714/ http://lwn.net/Articles/458714/).
- fffggg 14y agoCore network as well as many POSIX functions which other languages place in sub-modules (but still use the same names for). eg select() vs IO.select or mkdir() vs FileUtils.mkdir. OP is clearly thinking of PHP.
- zvrba 14y ago> Did you know there is a Perl package that will catch references to undefined symbols and fuzzy match them to the closest it can find in the current scope. To me, that seems to be the marker for the general quality of the code. To me, just the fact that this is possible witnesses about the flexibility of the language.