2 ms·
Who cares? Why does that matter? Ask the guy who made the slides debunking the "myth". This is not about hiring or recruiting people. This is simply about la
by Goladus 17y ago
Who cares? Why does that matter?
Ask the guy who made the slides debunking the "myth".
This is not about hiring or recruiting people. This is simply about language readability.
I have been using perl longer than any other major language except C, and I still have to review basic syntax crap every time I have to read perl code.
... just like every other programming language ever written.
Not true. Perl requires significantly more language-specific trivia than most other languages, and for marginal benefit. Differentiation between scalar, list, and hash is not especially useful most of the time. It doesn't significantly help readability (or writability) and makes the code more complicated.
A nonstandard default array index is one piece of trivia. In fact, it can be deduced from the example I gave, and if you aren't sure you can check. I highlighted several in that one perl example.
- berntb 17y agoFirst, the name is "Perl" -- "perl" is the executable. If you have written so much Perl, you should know this. >>I highlighted several in that one tiny perl example. You can highlight lots of examples by choosing how to write the code. The Perl code could be very similar to the Lua. But, yeah... the linguistic inspirations gives more syntactic ways to write things. That is not only bad, but (as TFA said), you better follow the "Best Practices" book. All that is anyway dwarfed by the language specific libraries you use, as soon as you do something interesting. Personally, I think the worst part of Perl is all the painful trolling you have to suffer on the discussion web sites... >>A nonstandard default array index is one piece of trivia. Hmm... that would in fact be really weird. I have lots of habitual loops over indexes etc which I'd have to change, lots of edge cases. It would be like driving a car where you turn the wheel left to turn right -- but only on Mondays.
- Goladus 17y agoSorry that you don't like the "trolling". At worst, I am venting, though I am trying to make a point. The reality is that I am annoyed at having to deal with perl (actually am using DBI.pm; written by the guy who created the original slideshow) and am annoyed to read him "BUSTING!" a Perl readability myth without even understanding why Perl is hard to read in the first place. You could have written the Perl code very similar to the Lua. No, in fact, you can't. You can't use parameter lists in perl. You can't use variables without context. And even where you can, this particular example which I just pulled up completely randomly wasn't written like lua. Which is what life is like when you are surrounded by perl code and are not a perl expert. Here's real code I was annoyed to have to read: ABC::Myclass->find_or_create({thing => $thing->itm, otherthing => $x->itm}); Double-colon, hyphen-arrow, equals-arrow, variables with context specifiers, curly braces, and parentheses all for a simple library call. Curly braces normally mean a block of code, but here it means we're defining a hash. Double-colon and the dereferencing symbol mean different things, but I don't really have to care about that, it's just visually distracting. With python syntax it might look like this: ABC.Myclass.find_or_create(dict(thing=thing.itm, otherthing=x.itm)) If you don't remember what dict() does you can look it up. Alternately: ABC.Myclass.find_or_create({'thing' : thing.itm, 'otherthing': x.itm}) Note that in Python, curly braces are the standard way of defining a dictionary literal and are not used for anything else, as one can determine by searching for '{' in Python's context-free grammar: http://www.python.org/doc/2.5.2/ref/grammar.txt http://www.python.org/doc/2.5.2/ref/grammar.txt. To determine that those curly braces in the perl example defined a hash, you have to root around in the docs looking for curly braces until you stumble on something that discusses hashes rather than code blocks. All that is anyway dwarfed by the language specific libraries you use, as soon as you do something interesting. I would agree that by the time you are neck-deep in a gigantic perl project then all that trivia will come second-nature. I have never done a gigantic project in perl. I have read lots of code various languages, though. Perl and C are the only ones where the language itself gets in the way, and C is really not that bad. (C++ is so bad that I'm not claiming to have ever successfully understood C++ code for a significant program)
- berntb 17y ago>>without even understanding why Perl is hard to read in the first place. You are talking about Bunce there.. he is smart (and pedagogically talented) enough to know what he is talking about, more than amateurs like us. :-) >> Which is what life is like when you are surrounded by perl code and are not a perl expert. Hmmm... you wrote "using perl longer than any other major language except C"? At the end, you wrote that you mostly read code... you're not really a full time programmer, but browse code for different languages? Again -- you're out of luck with most "real" environments, since you need the libraries. TCL is really optimized to be trivially easy... >> You can't use parameter lists in perl. You can't use variables without context. There are misfeatures in all languages. Without checking, you can find solutions for most every Perl problem on CPAN. If you go there, check Moose. Also check Enlightened Perl/Modern Perl on the web. If you are only going to read without writing, then you will probably not start enjoying Perl. If you use it for real, it is fun and has a really good community. Most of '::', '->' etc exist in other languages. I already discussed that. For another example, Python's ability to keep {} for one thing really kneecaps the possibility to do one-liners with the same syntax... :-)
- Goladus 17y agoYou are talking about Bunce there.. he is smart (and pedagogically talented) enough to know what he is talking about, more than amateurs like us. :-) It's not an uncommon problem for really smart people to have mistaken assumptions about what makes things hard.
- berntb 17y agoI'll expand on that. As you yourself has noted, you don't write enough to really know the language. Tim Bunce talks about what goes for real users of the language. Also, he is quite central in the community and certainly knows more about problems with education and teaching than either of us.
- jrockway 17y agoNo, in fact, you can't. You can't use parameter lists in perl. You can't use variables without context. This statement is meaningless. I have no idea what you're talking about. Try this: function( args => 'go here' ) And anyway, what exactly is the difference between your JavaScript (Lua? Python?) example and your Perl example? ABC::Myclass->find_or_create({thing => $thing->itm, otherthing => $x->itm}); ABC.Myclass.find_or_create({'thing' : thing.itm, 'otherthing': x.itm}) Other than "Myclass" being a field of ABC in your example, I don't see any difference at all. Your argument really makes no sense. I suggest you just say "I hate Perl" and stop trying to justify it.
- jrockway 17y agoI have been using perl longer than any other major language except C, and I still have to review basic syntax crap every time I have to read perl code. I have been using Perl longer than any other major langauge, and I never have to review "basic syntax crap". Not to make a personal attack, but perhaps the problem is not Perl.