help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbol


From: Emanuel Berg
Subject: Re: why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbols?
Date: Wed, 01 Jan 2014 20:02:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

>>> The only thing I can think of that I saw in other
>>> languages and not in Lisp is *pattern matching*:
>>> branching straight off the functions' heads, like
>>> it is possible to do (and a very common practice)
>>> in languages like Erlang, SML, and Haskell. But I
>>> suppose it could be implemented as a Lisp macro if
>>> you really cared for it.
>>
>> For what it's worth, you might find Shen interesting
>>
>> shenlanguage.org
>>
>> From the "Shen in 15 Minutes" page:
>>
>> (define factorial 0 -> 1 X -> (* X (factorial (- X
>> 1))))
>
> Yes, that's exactly what I meant, and that looks like
> a mix of Lisp and Erlang.

I just read on the Shen page that

> Shen began many years ago in 1989 when Dr. Mark
> Tarver was working at the Laboratory for the
> Foundations of Computer Science at Edinburgh.  The
> original idea was to bring to the Lisp environment
> many of the advantages of ML; specifically
> pattern-matching and later type checking.

So they did a new language just to get pattern-matching
in Lisp! I'm unsure if that is sheer folly *or*
dedication that should be admired. Anyway, "ML" is
probably the progenitor of the "SML" that I mentioned -
I also remember a "MosML" - Moscow ML - probably just
another dialect.

As for the type checking, I remember you could do that
in ML, only you didn't have to. I am unsure what perk
that would bring except for the occasional bug that
could be found prior to run-time. But testing is so
essential to software anyway so I can't see any real
advantage of that. When you are used to not thinking
about types (as in Lisp) you don't want to do that
again. At least I don't. But please fill me in what the
fuss is about.

Also, when you think about how many Lisp dialects there
are - the Wikipedia article for "LISP" lists these -

Arc, AutoLISP, Clojure, Common Lisp, Emacs Lisp,
EuLisp, Dialects Franz Lisp, Interlisp, ISLISP, LeLisp,
Maclisp, MDL, Newlisp , NIL, Picolisp, Portable
Standard Lisp, Racket, Scheme, SKILL, Spice Lisp, T,
XLISP, Zetalisp

- you kind of wonder if there is no pattern matching or
"type check" (?) in any of those?

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]