Sujet : Re: Command Languages Versus Programming Languages
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 12. Nov 2024, 10:23:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vgv6qr$1h7ol$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 11.11.2024 22:24, Lawrence D'Oliveiro wrote:
On Mon, 11 Nov 2024 07:31:13 -0000 (UTC), Sebastian wrote:
In comp.unix.programmer Muttley@dastartdlyhq.org wrote:
>
[Perl’s] syntax is also a horrific mess. Larry took the worst parts of
C and shell syntax and mashed them together.
>
I think you've identified the one language that Python is better than.
In terms of the modern era of high-level programming, Perl was the
breakthrough language. Before Perl, BASIC was considered to be an example
of a language with “good” string handling. After Perl, BASIC looked old
and clunky indeed.
I'm not, erm.., a fan of Perl or anything, but comparing it to BASIC
is way off; Perl is not *that* bad. - N.B.: Of course no one can say
what "BASIC" actually is given the many variants and dialects. - I'm
sure you must have some modern variant in mind that might have little
to do with the various former BASIC dialects (that I happened to use
in the 1970's; e.g., Wang, Olivetti, Commodore, and a mainframe that
I don't recall).
It's more interesting what Perl added compared to BRE/ERE, what Unix
provided since its beginning (and long before Perl).
Perl was the language that made regular expressions sexy. Because it made
them easy to use.
For those of us who used regexps in Unix from the beginning it's not
that shiny as you want us to buy it; Unix was supporting Chomsky-3
Regular Expressions with a syntax that is still used in contemporary
languages. Perl supports some nice syntactic shortcuts, but also
patterns that exceed Chomsky-3's; too bad if one doesn't know these
differences and any complexity degradation that may be bought with it.
More interesting to me is the fascinating fact that on some non-Unix
platforms it took decades before regexps got (slooooowly) introduced
(even in its simplest form).
Janis