3 ms·
I posted this article. I believe that the author, Matt Might is a professor specializing in programming language theory at the University of Utah. My understan
by sea6ear 13y ago
I posted this article. I believe that the author, Matt Might is a professor specializing in programming language theory at the University of Utah.
My understanding of this article was that it was less of a tutorial and more of an analysis of the actual semantics of Perl. Thus it is less about how one should write "Modern Perl" than it is about how Perl actually behaves in various circumstances.
- Mithaldu 13y agoIf it's not a tutorial then i don't understand why he explains EXTREMELY basic things in the worst possible way, fails to actually explain the interesting details of subtle and complex things (like the differences between the ways a sub can be called (no, they do NOT all do the same thing)), and managed to produce a document that looks like it contains literally ALL the things from ALL the bad tutorials i've seen in the past 9 years, with nothing from any of the good ones.
- mst 13y agoActually, he does appear to explain &foo() later on, he just doesn't bother mentioning up front that it's completely different. I think if you consider it as an academic piece, where you're supposed to read all of it and then think, it wouldn't be a bad introduction to perl as it was written in 2003.
- tredontho 13y agoOkay, I've read a few of Might's posts, and they're pretty interesting. But it irks me for some reason that nowhere in the posts can I find a date. Am I missing something? Where did you grab this 2003?
- mst 13y agoFrom the code. Were I to paranthesise the sentence, "perl as it was written in 2003" would be one clause.
- jsnell 13y agoIt appears that you've decided it must be a tutorial, and your only basis for that is that it's not a tutorial. That's extremely uncharitable, almost insanely so. Especially since the word "tutorial" appears nowhere in the text. The only reference to learning or teaching is a list of resources for actually learning Perl.
- mst 13y agoRight, but when there's more than one syntax to use to get that behaviour, he invariably picks the c.2001 preference rather than what we've done since. It's like if somebody started their ruby tutorial off with how to implement your own object system with method_missing. Sure, it fits the 'actual semantics', but it's not what we really want people to see first :)
- sea6ear 13y agoI'd actually enjoy that :) However, I first really understood objects from learning how to create them from closures in Scheme. And I'm not sure how many object systems built from array reference hacks in Tcl I've looked at. But probably not what most people are probably looking for when they are first trying to understand something like Perl or Ruby.
- perigrin 13y agoActually (and sadly) for some jobs with Perl that involve codebases older than 2007. That material would be useful. Because, like the languages you mention, deriving object systems from Perl5's rough axioms, was at one point something of a hobby for people.
- mattmight 13y agoOver the course of the article, I tried to show as many different ways of doing something as possible, without assigning judgment as to the "right" way to do something. If you point out instances where I only documented the old syntax, let me know, and I'll add newer examples as well.
- Mithaldu 13y agoThe point is that in every single topic you touch where there is a more modern way to do it, if you mention that modern way, you do it as an aside; instead of first showing the modern way of doing it, and then mentioning as an aside that there is an insane way of doing it.
- mattmight 13y agoYou're exactly right. An alternate theme for this article might be: "What happens when a formal semanticist looks at Perl?"
- ediblenergy 13y agoThat would be a better title than "Learn Perl by experiment" or "perl-by-example" or "A Guide to Perl: By Experiment" all of which suggest a tutorial, which you're saying is not what you're trying to present.