Neill Newman neill@entora.co.uk writes:
problems, for there are many: Java still doesn't have closures, continuations, first-class procedures...
This may be true, but how many of us know what those mean, how many of us care ;)
Now who's the person with the CS degree? What's wrong with this picture? ;-)
Alexis Lee alexis@turton.com writes:
The advantage of a huge standard library is it keeps things standardised. Instead of a zillion vendors each doing their own thing to look up, you just need to flip thru the API.
You still have the manual open when programming, the same as for extension libraries. Of course, you abstract away the platform-specifics if you can, no matter what language, so I guess that's a little work done for you. Depends how good the abstraction in the standard API is (eg *argh* Polygon and co-ordinate pairs... now what happens when not working in 2d?)
[...] I quoted Scheme instead of Prolog primarily to bait you, and secondarily because I thought more people might have heard of it. If Scheme is nothing like either L or P I will go and hide under a rock.
Normally a plonking offence, but Scheme is a lot tidier than Lisp in that a lot of the old stuff that's there for compatibility is gone, as well as some Lisp features not being in the core of Scheme. The standards are 50 pages for Scheme and 1500 pages for Common Lisp... guess which is generally faster to run ;-)
Off the list, Mark, are there any instances where a task can only be done using closures, or using a closure enhances efficiency? [...]
It's just a quick one, so I'll put it in here. Closures make caching easy, eg (pseudocode gratis):
(define cachedretr ; want more scheme? http://www.schemers.org/ (let ((cache '())) ; oooh, a variable initialised to be an empty list (lambda (id) ; the variable is in-scope in here but nowhere else ; get data and add it to the cache if it's not there and fresh ; return data from cache )))
cache is something more than a per-function private variable, I think.
And what the heck are continuations and first-class procedures?
Continuations are the future of a program at a given point. Procedures being first-class means being able to treat them as any other variable. Both features can be used for very neat tricks. No, it's not an everyday thing, but they're useful to have in the toolbox.
Anyway, I suspect Scheme is on at least as many Linux boxes as Java...