5 ms·
For reasons not completely unrelated to the rant.
by jjindev 13y ago
For reasons not completely unrelated to the rant.
- kyllo 13y agoYeah. I think pg said it well: Kevin Kelleher suggested an interesting way to compare programming languages: to describe each in terms of the problem it fixes. The surprising thing is how many, and how well, languages can be described this way. [...] Perl: Shell scripts/awk/sed are not enough like programming languages. Python: Perl is a kludge. Ruby: Perl is a kludge, and Lisp syntax is scary. http://www.paulgraham.com/fix.html http://www.paulgraham.com/fix.html
- snogglethorpe 13y agoWait, awk is "not enough like a programming language"?! Awk is a lovely little programming language... (rather lovelier than Perl if you ask me, though obviously less industrial-strength)
- kyllo 13y agoI'm not terribly familiar with awk, but it seems very useful. My understanding is that it lacks a lot of the features that people expect from a modern, general-purpose programming language (not that it can't be or hasn't been done--but you're probably not going to be writing a web server in awk for example), but also that awk has been improved significantly since the mid 80s when Larry Wall decided to create perl as basically "a better awk." But awk is definitely very good in its niche, which is processing text data.
- wonderzombie 13y agoI expect he means that awk may seem more like a DSL than a full-fledged language, even though/if it's possible to use it like a programming language. (Another example may be that it wasn't really intended to be a general-purpose language, IIRC that chapter in Masterminds of Programming.) I don't know that anyone necessarily believes you couldn't program with awk in an absolute sense, but it doesn't read like a glorified shell script in the way that perl is explicitly designed to.
- tod222 13y agoThe issue was that none of the trio of shell scripts/awk/sed could stand alone, so the "language" by necessity consisted of all three tools. You'd write the main loop in shell and use awk and sed when required. Remember, this was 1987—25 years ago, before bash and other modern shells, and with much more primitive versions of awk and sed. Nor was the web available to look things up. Writing shell/awk/sed scripts back then was awful, no matter how much the Bell Labs folks touted its superiority. When perl showed up on comp.sources.unix it was an incredible breath of fresh air. I downloaded and built perl based on its claim to replace shell script/awk/sed programming and Larry Wall's reputation as the author of rn [1], my preferred newsreader for usenet. Perl lived up to its billing and was an enormous improvement for writing scripts. [1] http://en.wikipedia.org/wiki/Rn_%28newsreader%29 http://en.wikipedia.org/wiki/Rn_%28newsreader%29
- snogglethorpe 13y agoHmm, I used awk in 1987, and it was just fine... it really hasn't changed all that much since. "nawk" ("new awk") vs. "awk" was an issue, with the former being preferable (I don't recall why offhand, other than it seemed a lot less buggy), but even that dated from the mid-'80s. Perl certainly offered new functionality, but it felt palpably kludgier than awk. The idea that it was some sort of giant advance over awk was rather overplayed, especially within awk's domain, where awk's cleaner language design and more focused features were real advantages over perl. [When perl first showed up, I remember thinking how churlish its "a2p" script was... who'd want to switch to perl, given a working awk program?!]