Re: Very poor Lisp performance



Jon Harrop wrote:
> Tayssir John Gabbour wrote:
> > Now despite all this, Lisp DOES respect other traditions. Observe LOOP,
> > which is like every for(;;) loop in every language rolled into one.
> > Dirty and rewarding, the sort of thing which probably makes Haskellers
> > and MLers scream indignantly.
>
> Not really. OCaml has (more restricted) for loops and both SML and OCaml can
> implement customised for loops.

If this is true, MLers may be more mature (or some might say twisted)
than many Lisp users, as LOOP is offensive to a percentage of Lisp
users for being "unlispy." Maybe too hedonistic. ;)

I think comparing LOOP to a for-loop is like comparing [insert apt
mountain vs. molehill comparison here]. I like it a lot though.


> > Also, there are infix parsers and whatnot
> > floating around the net, for when conventional syntax is appropriate.
>
> I heard that infix parsers are rarely used not because infix is worse but
> because infix is unusual in Lisp code and increases incompatibility. Would
> you agree with that?

Well, almost every domain-specific language is unusual. But Lisp
invites people to craft such languages when appropriate for readability
and maintenance.

For example, times and dates don't look "lispy" (8:34 at 8-2-2005, or
RFC 2445's 19980118T230000), but I have "read-macros" which allow me to
use this unusual syntax in sourcecode when performing datetime
calculations.

People shouldn't go nuts though. Any given paradigm has a sweet spot
past which it becomes increasingly questionable to push:
http://lisp.tech.coop/lisp-user-meeting-amsterdam-april-2004#macros-and-codewalkers


> >> There is unquestionably a huge amount of evidence to the contrary. Most
> >> natural and programming languages have complicated grammars precisely
> >> because it simplifies their use and makes them easier to understand.
> >
> > Would you please point us to evidence in this direction?
>
> Firstly, do you agree that languages are evolving to be more concise?
> Secondly, do you agree that more concise languages tend to have more
> complicated grammars? Finally, what other reason could drive this
> association?

I feel I'm expected to be in some role debating you (maybe a weird
spidey-sense left over from debate team), but I'm genuinely interested
in the evidence you mentioned. So I'm still curious what evidence there
exists, and don't feel suited to analytical debates.

That said, there are examples of languages designed both towards and
away from syntactic concision.

APL/J/K seem to beautifully use concision. If Alan Kay is to be
believed, one screen or so essentially holds short-term memory, and
concise languages certainly help here. (I hope I'm not butchering his
point.)
http://www.archive.org/details/AlanKeyD1987_2

On the other end of the scale, I recall natural languages are quite
verbose, relative to information content. Java is also quite verbose,
more than I like, but it seems to be very popular...

Lisp is a bit tricky to place on this spectrum, since it contains
uncommon abstraction tools like macros and whatnot. Many people (I
think convincingly) point out that many of Lisp's features don't make
much sense in small codebases; they spread their wings in large ones.
So there are different paths to judging concision.


Tayssir

.



Relevant Pages

  • Re: whats the best way to do this?
    ... Each are embedded languages cum Lisp ... > am just learning LOOP and FORMAT now. ...
    (comp.lang.lisp)
  • Re: Lisp collections
    ... >> the same as a Lisp sequence, I guess, only it's more consistently used. ... > The LOOP macro is pretty complete in allowing iteration over the data ... Extensible LOOP implementations ... > you expect things to work like they did in other languages. ...
    (comp.lang.lisp)
  • When static typing is worth it
    ... typed languages like Lisp. ... developed more quickly in modern statically typed languages than ... static type system and remove run-time checks. ... incurs a run-time error if the list is ...
    (comp.lang.lisp)
  • Re: What is Lisp used for?
    ... My main languages are Perl, Java, and ColdFusion. ... Lisp PHP FlamingThunder). ...
    (comp.lang.lisp)
  • Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
    ... what MLish languages do in this case. ... If you are trying to compare my OCaml code with your Lisp translation then ... Lispers not only fail to understand the benefits of pattern matching ... but it is a Java extension just much as Clojure ...
    (comp.lang.lisp)