query: threads in newLISP?

Started by kazemori, September 08, 2003, 10:20:11 AM

Previous topic - Next topic

do you want to see thread support in newLISP?

yes, newLISP lacks concurrent processes.
3 (75%)
nope, threads would add nothing to newLISP.
0 (0%)
newLISP-Tk needs threads to sew on its buttons.
1 (25%)

Total Members Voted: 4

Voting closed: September 08, 2003, 10:20:11 AM

Lutz

#15
You will definetely not draw flames from me. This is exactly the kind of comments I was looking for. In detail:



(1) 'member'

I thinks I have never even used it once! It's there only because of historical reasons and because it seems to mentined in all introductions to LISP. If no body else feels strong about it I also would like to get rid of it.



(2) 'cond'

The form with less parenthesis seems attractive to me and as you mention 'if' would then just be a special case of it. We could change 'if' to the newer multi arg form, then (who wants) could just do a (set 'cond if) to get a new 'cond'-binding. After a while we could mark the old 'cond' as deprecated and eventually throw it out. Never thought about it but seems attractive to me. What do others think? Isn't that the way AutoLisp is doing it?



(3) 'first' with 'nth 0'

Its such a frequently used function and the ex- 'car', 'head' etc.. I could imagine there is a lot oppostion. I myself sometimes use 'nth 0' for more readability, when I use a lot of other 'nth x' in the same area of code. I would like to hear more opinion that one.



(4)  'let' and 'let!'

let wasn't there until a year or two ago. Instead I had supplied a macro. Too many people where asking for it. let! alias 'letrec' .. yeah I agree. Personally I use 'let' rarely and use the 'local effect' of unused parameters instead. What I mostly dislike about 'let' is, that it adds to parenthesis clutter. If let! is cheap to do on top of 'let' I'll do it if its just another little bloat, I would rather like to get rid of it again because using the 'local effect' of unused parameters is a much nicer way to do locals when doing dynamic scoping anyway (in Scheme 'let' gives you at least lexical closure).



(5) 'lookup' versus (rest (assoc ...))



'lookup' can specify which position you want in the assoc list i.e.:



(lookup 'a '((x q w e r t y) (a q w e r t y)) 1) => q



I would love to keep it. although of course you could do (nth x (assoc ...)). Its just very handy when getting GET or POST or COOKIE parameters vi cgi.lsp and faster too, if you do a lot of it.



(6) 'assoc-reverse'

what is it? How would it work?



some other thoughts:

what about the way that 'for' works with the always positive step-parameter? Does this confuse everybody , or do you think its nice.



BTW for all Mac OSX users, just got 'import' working for Mac OSX. it will be included in the next distribution. If somebody needs it now, please contact me.





Lutz

HPW

#16
>(1) 'member'



Would it cost so much to keep traditionals like this inside?



>(2) 'cond'

>The form with less parenthesis seems attractive to me ...



Attractive for reading and typing, but modern editor with parenthesis checking and formating makes life easier when programms grow. Then you can jump over code blocks from starting to closing parenthesis.



>Isn't that the way AutoLisp is doing it?



Yes, and people coming from there, would like to have the current cond.

Of course it remains your decision. As you wrote, it is not easy to get it right for all users.





So for my taste, do not leave traditional lisp to far behind.
Hans-Peter