[A86] Re: What about LISP?


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

[A86] Re: What about LISP?




On Tue, 18 Dec 2001 21:26:45 -0500 David Reiss <davidr42@optonline.net>
writes:
> Personally, I think Scheme on a calculator would be interesting from 
> an
> implementation point of view, but I really doubt that much practical
> good will come from it. Certainly, an interperter would be much too 
> slow
> to write useful programs in. A compiler might be slightly more 

Why so certain?

> useful,
> but making it generate good code would be even harder than making 
> the
> current C compilers generate good code. You'd also have to write a
> pretty big library in assembly to make certain operations fast

Not much bigger than that of a bunch of games that include them.  But
you'd need a pretty big library anyway since you more or less have to
include an interpreter no matter what.

> (putsprite, for example). And then there's the necessary garbage
> collection, which would slow things down even more.

Garbage collection can be slow,  but considering the way the calculator
currently handles this, I wouldn't worry too much.  And even poorly done
garbage collection doesn't make things slow overall, it makes them slow
occasionally.  If you choose the times when it's run well it might not
even be noticed.

> The one big advantage of Scheme would be on-calculator development,
> because it's so easy to type and parse. But that would restrict you 

Personally, I'd prefer something like logo that requires much fewer
parenthesis, but I'm not likely to use this much anyway...

> to
> an interpreted environment, which would probably be too slow for
> anything useful. Still, it's better than basic, and it might be fun 
> to
> work on.

ti-basic has been useful for some things, and a properly done lisp/scheme
interpreter could probably be faster.
Especially: 'if enough "primitive" operations are made in pure assembly'

I think a lisp-like language would be much more useful for symbolic
manipulation than for gluing together inline assembly.

-josh