| >IMO, this argument is a red-herring: you can write bad code in any language. I would be delighted to see you cause a segfault in Haskell without taking advantage of an implementation bug. The point isn't that you can or cannot write bad code in any language, it's not that simple. It's a matter of how difficult a language's semantics, type-checking, logical structures, and faculties make it to traverse the spectrum towards bad code. Python has clean indentation baked in at the implementation. All major interpreted languages don't allow you to muck around with pointers. Functional languages strongly discourage mutability. Object oriented languages are really just a foil for context scoping in various ways combined with somewhat sanitary code-reuse that is less likely to introduce type or memory sharing bugs. It really bothers me when people say, "you can write bad code in any language". Of course you can, but that ejects the subtlety and reality of the matter into vacuum. You cannot disregard the effect of the programming environment on the code, and the supposed canard of Perl's write-once read-never is not false but rather, a tendency that it facilitates. I mean, have you seen the number of operators in Perl? http://tinyurl.com/badvbx (large 300 dpi jpg, Period Table of Operators in Perl) While this makes Perl the king of golfing, the mental context it consumes to remember all the operators someone else may use in their code (but that you do not) makes reading their code a non-trivial task. This is precisely the thing people complain about when comparing (unfavourably) C++ to C. There's just too much syntax and too many complicated interactions that make it nearly impossible to reason about what the code does, let alone any degree of referential transparency. Potentially one of Lisp's most powerful attributes is as you may have heard, the lack of syntax. The one ever-present syntactic feature in Lisp (paren) is widely mocked as well by detractors! Perl is awesome. It's erudite. It's a fantastic means of parsing and manipulating text (I vastly prefer Perl to awk/sed abuse except for in-line commands.) Perl documentation is really good too. All the meta of what makes a languages pleasant to use, is mostly there for Perl, but the language itself is a syringe of heroin and rat poison, just begging you to abuse the power. And don't mention CPAN. People who accuse Python libraries of being written by amateurs haven't seen the manifest horrors that exist in CPAN. Rubyists have it good by comparison. Can we please drop the "you can write bad code in any language" line now? |
You mean a different kind of "bad code" than the comment to which you replied.
Ruby, Python, Haskell, Prolog, ML, CL -- none of these languages prevent malicious or inexperienced coders from choosing poor identifiers, violating encapsulation, abusing or ignoring language-specific idioms, or designing a big ball of mud.
> I mean, have you seen the number of operators in Perl?
That's Perl 6, not Perl 5, and it's out of date.