Re:Returning multiple values from functions in C++
by adwf on Monday March 07, 2016 @06:00PM
(#11242430)
Yeah, I use Alexandria by default in every project now. I remember when I first started coding in Lisp, I wrote a ton of obvious functions/macros like the missing hash table traversals that are in Alexandria but are rather bizarrely missing from the Common Lisp spec. Then I found Alexandria and realised I'd written a good fraction of those functions myself! This was pre-quicklisp, so library discoverability wasn't great.
Now I'm trying to make a concerted effort to follow the recommendations here:
http://eudoxia.me/article/common-lisp-sotu-2015/
Hopefully this will lead to a modern set of consolidated libraries. Effectively a new Common Lisp standard: CL-20xx
Re:Returning multiple values from functions in C++
by lispm on Monday March 07, 2016 @06:32PM
(#11242562)
Common Lisp already provides various hash-table traversals with LOOP: http://www.lispworks.com/documentation/HyperSpec/Body/06_aba...
1) Learn to deal with a language which has an infinite number of syntactic abstractions.
2) Learn the typical patterns of syntactic abstractions (WITH- , BIND-, DEF- ...).
3) Learn how to write your own abstractions.
Then groups will settle on common (!) Lisp patterns. See for example:
https://common-lisp.net/project/alexandria/
There are lots of libraries which provide language extensions, which are used by many people.
The extremes in Lisp are then:
* no syntactic abstractions -> the power of Lisp wasted
* using those syntactic abstractions which are approved by user groups, due to inclusion into libraries
Above choices are relatively conservative.
As another extreme, it is fully possible to change the language - but then Common Lisp provides more than macros to do so. See for example reader macros, CLOS MOP, customs evaluators/compilers, code walkers, ...