[ prog / sol / mona ]

prog


scheme vs common lisp

8 2020-05-31 19:47

>>6 At one time, people talked about functional programs as being made up of expressions. Evaluate the expressions (by function application) and you have your program. I think in this sense CL

But then people became more concerned with pure functions, which don't have side effects and always have the same output for the same input. Purely functional scheme, for instance, would mean not using set! or any other ! functions. Since even updating a database, saving a file, or opening a window are side effects, you can't get much done purely.

If you look at the implementation of the SRFIs or grep over your scheme, you can see it's rife with set!, so as far as scheme being functional in this sense, it's mainly just that users are encouraged to localize their use of these functions and make as many functions as they can pure.

But scheme is not purely functional.

But in CL you can, for instance, update a class, and all the running instances of that class will update to be instances of the new class. That doesn't sound very functional (in the pure sense) but it does sound good for development.

41


VIP:

do not edit these