setq
It hasn't been in newLISP for 11 years (or only as a macro). setq has the advantage that it doesn't need the quote and is for that reason 50% faster, all LISPs really have them both the 'set' and the 'setq' or 'set!' and over the years I have been asked for it again and again. The last push was multiple arguments in set, now it becomes obvious, that setq is much less typing, because you don't need a quote before every symbol.
Lutz
Lutz
>>> And all autolisp people love it! ;-)
And actually I do too :).
These decisions are not easy and I am pretty happy that after 10+ years newLISP is still pretty small compared to other languages. It's always a conflict, because for the person asking for a new feature it is very often of great importance.
I wonder what else people have on their minds for added functions in newLISP, and what are the functions, nobody cares about? I.e. I never have used 'member' in my entire life, but it is one of those 'traditional' LISP functions everybody expects in a LISP, but do we really need it with all the other high-level list processing stuff in there?
Lutz
And actually I do too :).
These decisions are not easy and I am pretty happy that after 10+ years newLISP is still pretty small compared to other languages. It's always a conflict, because for the person asking for a new feature it is very often of great importance.
I wonder what else people have on their minds for added functions in newLISP, and what are the functions, nobody cares about? I.e. I never have used 'member' in my entire life, but it is one of those 'traditional' LISP functions everybody expects in a LISP, but do we really need it with all the other high-level list processing stuff in there?
Lutz
I think I used member one time but I could have used find just as easily.
Yep. Tradeoffs are a pain.
I thought about asking for find to return regex output on regular expression matches and doing away with regex but then find returns a position and it might be confusing for find to return an integer for some things and list for others.
It's nice to have a minimal and elegant set of functions to keep a language easy to learn and use. But I have to admit it's REAL nice when there is a pre-built function that really fits the bill without having to write it yourself.
Eddie
Yep. Tradeoffs are a pain.
I thought about asking for find to return regex output on regular expression matches and doing away with regex but then find returns a position and it might be confusing for find to return an integer for some things and list for others.
It's nice to have a minimal and elegant set of functions to keep a language easy to learn and use. But I have to admit it's REAL nice when there is a pre-built function that really fits the bill without having to write it yourself.
Eddie
Understandability
I am in favor of the minimal and elegant set of functions, which could then be used to build a set or sets of extension functions to be loaded separately. Clean. Well-factored. Understandable.
The functions could then be optimized by re-writing at a lower level, if necessary for performance reasons, but only after the solution is understood.
The functions could then be optimized by re-writing at a lower level, if necessary for performance reasons, but only after the solution is understood.
>> I am in favor of the minimal and elegant set of functions,
that is pretty much my philosophy too, but sometimes I have to water it down when too many are asking for it and sometimes I am one of them. But I think overall that philosophy is pretty much maintained in newLISP.
About regex: at this moment only 'find', 'replace' and 'regex' use regular expressions. when I went through all string functions checking for the possibility of regex, this is what I came up with. Other functions like 'starts-with', 'ends-with' can be easily done in the first three. I wonder if anybody has additional suggestions.
Lutz
that is pretty much my philosophy too, but sometimes I have to water it down when too many are asking for it and sometimes I am one of them. But I think overall that philosophy is pretty much maintained in newLISP.
About regex: at this moment only 'find', 'replace' and 'regex' use regular expressions. when I went through all string functions checking for the possibility of regex, this is what I came up with. Other functions like 'starts-with', 'ends-with' can be easily done in the first three. I wonder if anybody has additional suggestions.
Lutz
I agree Lutz, I see no reason to use starts-with or ends-with. However, some users might not want to learn regular expression syntax.
How about sublist and substring? Very similar operations except one is list and the other is a string. How about a poly morph function called slice or partition, ...?
Eddie
How about sublist and substring? Very similar operations except one is list and the other is a string. How about a poly morph function called slice or partition, ...?
Eddie
I like subseq as a substring/sublist substitute. Severals reasons:
-Its already in Common Lisp, it reminds you better about what it does.
it reminds also where does it come from, i.e. substring/sublist
Functions' names should be 'selfexplanatory', as far as possible.
As for setq, I agree it has been there for a long time, and left everyone satisfied.
On other more specialised functions, I'd rather encourage the creation and sharing of specialized libraries. -after all, thats what Lisp escells at -modular, reusable code - just paraphrasing Paul Graham !
Still , I think any Lisp should be proudly strong on list-managing functions !
-Its already in Common Lisp, it reminds you better about what it does.
it reminds also where does it come from, i.e. substring/sublist
Functions' names should be 'selfexplanatory', as far as possible.
As for setq, I agree it has been there for a long time, and left everyone satisfied.
On other more specialised functions, I'd rather encourage the creation and sharing of specialized libraries. -after all, thats what Lisp escells at -modular, reusable code - just paraphrasing Paul Graham !
Still , I think any Lisp should be proudly strong on list-managing functions !