Re: New Perl Features are Just Sugar From Language X
by Joost (Canon) on Oct 12, 2004 at 23:25 UTC
|
At the moment I'm learning LISP, and it's interesting to see so much stuff that is new and confusing and (probably) coming in Perl 6 already in use in (Common) Lisp for decades - e.g. coroutines & continuations, a really useful macro system, etc...
To contrast - Common Lisp was standardized in 1986, and the original LISP was implemented in the 1960's, while Perl 1 was released december 1987.
| [reply] |
|
|
According to The Implementation of LISP, the original LISP actually was implemented in 1959.
As for coroutines and continuations, these are not built into Common Lisp. However if you write the right macros and adhere to strict standards, you can achieve them. Or if you postprocess Common Lisp, you can again create continuations. See On Lisp for details.
What we don't often hear in the Perl community is that continuations are not necessarily a positive feature in a language. For an example of why not, what belongs in a useful stack backtrace if you are using continuations?
| [reply] |
Re: New Perl Features are Just Sugar From Language X
by jdporter (Paladin) on Oct 12, 2004 at 19:03 UTC
|
- Hashes: significant academic research before Perl got them. I'm not sure if anyone integrated them (or other types of associative arrays) so closely into the langauge before Perl did.
awk, at least.
| [reply] |
Re: New Perl Features are Just Sugar From Language X
by BrowserUk (Patriarch) on Oct 13, 2004 at 07:25 UTC
|
| [reply] |
|
|
| [reply] |
|
|
My Perl experience only goes back as far as 5.6.1, you'll need merlyn or one of the others with the Knowledge of the Ancients (sorry, too much Stargate :), for the answer to your question. I pretty sure that P4 had hashes, but I don;t even know when that came into being.
I do know that REXX had associative arrays way back in 1987. That was my first encounter with them, and I remember thinking that the were bloody nearly magical before I read up on hashing and hashing algorithms.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] |
Re: New Perl Features are Just Sugar From Language X
by Anonymous Monk on Oct 12, 2004 at 14:05 UTC
|
Virtual Machines (like Parrot): Java had one first, and Scheme and other LISP varients before that
Erm... If Schene had one before Java, Java's not the first.
Perl 5's a VM, and it's older than the JVM. Having said that, the UCSD P-machine's older still, as is the inform engine and any number of BASICs.
| [reply] |
|
|
| [reply] |
|
|
The point that Perl had a VM before Java is still important though. Parrot is just an attempt to polish and unhitch that wheel from Perl.
| [reply] |
|
|
| [reply] |
|
|
Good guess, but LISP wins. Forth was invented in 1968. The first version of LISP is about a decade older.
| [reply] |
Re: New Perl Features are Just Sugar From Language X
by FoxtrotUniform (Prior) on Oct 12, 2004 at 20:25 UTC
|
It would be hard to come up with a language feature that Perl invented itself.
Perl's "regexes" are quantitatively more powerful than most regex dialects, rather than just syntactic sugar run amok. I suppose if you want to be really fussy about it, all languages build on work done by Church and Turing (and you can probably go back to Peano and even Euclid if you want), but that's starting to get a little bit ridiculous.
Hmm... Church numerals in Perl? Sounds like a decent obfu gimmick.
--
Yours in pedantry,
F
o
x
t
r
o
t
U
n
i
f
o
r
m
| [reply] |
Re: New Perl Features are Just Sugar From Language X
by ambrus (Abbot) on Oct 12, 2004 at 20:40 UTC
|
What about the object system (symbol tables, globs, method calls, autoquoting in braces or before =>)?
The different variables associated to the same name:
scalar, array, hash, code, io, format (sure lisp has scalars and functions in different namespaces, but surely not so many types)?
Lexical and dynamic localization in the same language?
Function call without parentheses?
Function call syntax depending on prototypes?
Arrays and strings resizable efficently?
Such simplicity of string operations that you still can't find in any other languge?
These are all inventions of perl.
Also just show me a language with a reference-counting garbage-collector.
| [reply] |
|
|
| [reply] |