by muraiki · 10y ago · 0 comments
Perl code has many things to discover, and the way you assemble larger things relies on unique features of these smaller things. While in the end both approaches have you building a larger thing out of smaller things, the former approach is more likely to be built out of all of the same small thing, while the latter is more likely to be built out of a bunch of different small things. I think that's why some people can find Perl code to be "dense" and others find it "expressive".
I think Perl 6 was built with a much more consistent philosophy behind it than Perl 5, so this analogy breaks down a bit. But the user experience, the "Perlishness" of it, still remains. To the extent that people pick sides in language wars, I hope this analogy can help people appreciate the other side.
It's a bit like saying some people only like minimalist writers and some people only like maximalist writers. But a discerning reader is interested in quality over the style. That is, they recognize that there is good maximalism and good minimalism, and appreciate both.
http://modernperlbooks.com/books/modern_perl_2016/01-perl-ph...
Many (but not all) of the questionable decisions in Perl come from its origins in Unix philosophy and the desire to provide a comfortable migration path for system administrators away from command-line tools such as awk and shell. Where Perl's struggled in recent years to borrow features from Rakudo, it's because those features assume a different underlying philosophy.
Perl 6 may have a theoretically more consistent philosophy behind it than Perl 5, but as that philosophy would likely lead to even more complicated code than Perl 5 already does, I would live in fear of anyone at work adopting it for code I then have to maintain. Except that there doesn't seem to be any chance of that, precisely because everyone else around me feels the same way.
I'm not a lover of Scala, in fact I tried it and gave up on it because I didn't like its ratio of cleverness to simplicity (again, a personal opinion). But that said, and also being reasonably familiar with Perl, I would say that Scala is still much cleaner, more consistent, less idiosyncratic than Perl. I've seen some beautiful, expressive, masterful Perl code but I find that Perl really doesn't encourage me to write that way, while Scala works a bit harder to nudge you to write elegant code.
That said, may I observe that the hype seems to have died down for Scala. Everyone I personally know who was into it has dropped it. None of them would have shipped anything into production. Anecdotal, sure, but that's all we ever really have. My guess is that its own complexity is indeed strangling it. Only time will tell, but I'm not sure Scala is really that great an argument.
And, also, for consistency, yes, absolutely, I wouldn't want to suddenly be handed a Scala system to professionally maintain either.
Since I only do this less then full time my brain can't hold everything in it for Perl or similar languages. I can sit down with a Lisp and just work it out with the parts I know and have to look up things far less.
> There are some people who appreciate games that are very abstract and with
> simple rules from which complex behavior emerges, such as a game like Go.
I love Go, but I despise perl. Perl is not built on "very abstract and simple rules. For instance, this code is quite hard to reason about: 1: my @to-infinity-and-beyond = 0, 2 … ∞;
2: say @to-infinity-and-beyond[1008];
# OUTPUT:
# 2016
This is self-indulgent mucking around. An inference procedure which goes from "0, 2 … ∞" to "the even-nonnegative integers" is bound to lead to unpleasant and hard-to-debug surprises.(Though I'd probably use an asterisk instead of the infinity symbol)
> These people tend to be drawn towards programming languages that are built out of small pieces with a consistent philosophy from the ground up, such as lisp or Haskell.
If you like go and dislike perl its to his point.
A TLDR (because apparently); People who like games that are complex because of complex rules like perl. People who like complex games with simple rules dislike it.