Why do I stay with Lisp (and you should too)

A mature language can be used by few. But it remains part of my codebase.





As a longtime user (and active supporter) of Scheme / Common Lisp / Racket, I am sometimes asked why I prefer them. Fortunately, I have always led my own engineering organizations, so I never had to justify this to management. But there is an even more important audience - my own fellow engineers who have never had the pleasure of using these languages. While they don't need an excuse, they still ask out of intellectual curiosity, and sometimes out of surprise, why I'm not crazy about the next cool feature to be added this month to Python or Scala, or whatever. was their type.





Lisp (Scheme, Common Lisp, Racket, Lisp-for-Erlang), : , S-, , , λ-.





BASIC ZX Spectrum+, () Fortran. , - . , . (Turbo Pascal DOS), , C Unix (Santa Cruz Operation Xenix!). , .





, ( IISc!) ( Haskell), . . , , , .





, . Standard-ML. . . , ( ).





( « » / « »). Scheme Lisp. , . 25 .





, . , ? ? ? . , , .





. :





, S-, , , λ-.





- .





, λ-

- . . , , . , («»), , λ-.





, "" . . -, : (, ). - , . "" .





- . , , ( , sqr). , λ- , , .





, , . , . , . , . ( ), . , , .





, λ-, « » . λ- , , .





- , , , , . Scheme ( , Racket - CS, , ). , λ-, - , . λ-, .





, , , - . , , , « », . Scheme ( Racket) , . , Scheme.





, ( TCO - tail call optimization), . , . JVM, , JVM . JVM TCO, , , , JVM, , TCO. , JVM. Clojure.





. Scheme/Racket - , λ-. , " " . , , , . , Scheme , , , , . , , , .





(Call-By-Value)

, λ-, , , . : Miranda, ( Haskell). , , . , λ-. , , .





, , « » . ( ), , , , , .





, - , . - , , , . , , . , , - , - .





, . , . , . , , ( ) - .





, , , , , "λ- ", .





Scheme thunk- , , call-by-need, . .





- . : , . , .





-, . , . . . , - , , , , (spurious) , .





, - , , . , , , ( ) .





, Scheme , « , » ( , ), .





, , . , , . Eugenio Moggi. , , , . .





, . , , . ( ): « ».





- , , . , «», , , , . , , , , . .





, . (« »), , . , .





, , , .





. TypeScript JavaScript. Python JavaScript . . , -, .





. « » C, C++, Java, Fortran, . , - . , , "".





, -, : . , . , , , . "".





: - , . - , . , . ( , ), -, ( ).





, , . . . , ( ). - . , - , ( ).





. . , , . , , ( ), . , , . , , .





. , , , , - . . , , , . , , , .





, . , , . , ( ) , , . .





( ) . , - . . ( ) , . . , , . , , .





, . , , , . , , - - - . , , - array[float]. , . array[float]?





, , . , , .





, , . , , , array[byte], , . Scheme/Lisp/Racket - , . Scheme , Racket Typed Racket, . Common Lisp , , , .





, , Scheme/Lisp/Racket , , . .





S-

, , , Lisp. , S-, . . - , (), , . «(…)», , , «()». .





, , , , else, . , , «(a + b)», «(+ a b)», , «(+ a b c)». «+» - , , .





«keywords», , . , S- .





. , , , .





: (spurious) . . . , , .





. , . ( , , , .. Racketeers) . , , .





, , , -, . , Scheme , . , . , ( ) .





, S-, , , λ-.





Scheme/Racket/Lisp , , . ? , . . . , - , -, , , ( Ruby, , , : ).





, . 15 SDK C/C ++, Lisp. Java , JVM Scheme/Lisp/Racket. .





, API (Java, Ruby, Python, JavaScript, - Go Rust), Scheme/Lisp/Racket, , C/C++. , API, , , . Racket ( ) , , , , . , , Clojure , .





, , . , , Lisp Lisp, .





, , . -, : . , . , C C++, , . production-quality , , , , .





I admit that learning Scheme / Lisp / Racket is a little harder than learning Python (but much easier than learning Java / JavaScript). However, if you do this, you will become a much better programmer and learn to appreciate the beauty of these languages ​​in a way that nothing else will be enough.





Anurag Mendhekar (Tech Entrepreneur and Software Artist)








All Articles