From: Jean L. <bu...@gn...> - 2021-05-07 02:48:43
|
* Kaz Kylheku <ka...@ky...> [2021-05-06 19:11]: > > It is easy to find examples of Common Lisp as functional language, > > rather hard to find procedural examples. > > Where are you looking? It's hard to find examples of Common Lisp as > a procedural language in a book or tutorial that is ideologically > geared toward functional. > > If you look in real code, it's not hard to find procedural coding. > > Just now, I headed to github and tried to think of some known CL project. > > For some reason, the word *cl-who* popped into my head, probably > because my mind drifted toward authors and I was thinking "who" do > I look for? > > And so, I searched for cl-who and immediately landed on this: > > https://github.com/edicl/cl-who/blob/master/who.lisp > > Whoa! Look, it's full of setf, loop, incf, nreverse ... IMHO I was expecting more style without `defun'. I do understand and get the point that in your examples while there are many functions defined they don't just return the value but also change various states, including they could be changing global state. And that belongs to imperative programming style. Though in Lisp it would be rare to find a program without `defun' definitions. Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ |