6 ms·
This sounds wrong...so I thought I'd see what Notepad++ has built into its syntax highlighting lexer (langs.model.xml): * ~ 35, Python * ~ 53, Java * ~ 5
by bloblaw 14y ago
This 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.