Answer the question
In order to leave comments, you need to log in
Lisp or Haskell?
Good afternoon.
I really like FP for its intellectual sophistication. I choose what is better to dive into: Lisp (if so, what dialect?) or Haskell? (English is normal, so if you advise good literature on the topic, I will be grateful).
Because I am not a programmer (yet), but an ordinary PM, then the subject itself is interesting, without a serious practical component (unfortunately).
Required results from the study:
1. Enjoyment of the process
2. Pumping thinking
3. Better understanding of the FP paradigm that can be used in Java and Javascript.
There is only one criterion, but a serious one - little free time;
So far this is the impression:
1. Haskell - has practically reached the level of mass OOP languages, there is a trend towards the folding of a normal infrastructure - a large community, libraries, commercial projects. Accordingly, it is friendlier in terms of syntax, general readability, a lot of literature.
2. LISP - a thing in itself, a kind of esoteric sect - boundless and many-sided like the ocean, of little practicality, of little use, but interesting.
Answer the question
In order to leave comments, you need to log in
Let's start with the fact that Lisp is not functional. For those who come to Lisp from the world of imperative languages, it may seem that way, but I came to Lisp after Haskell, and I tell you for sure, Lisp is not functional.
Now on the topic - both languages are extremely interesting and capable of blowing your brain, but Haskell inserts more, it is really abstruse and replete with super-duper new sophisticated programming technologies (Applicative functors, combinators, monads, lazy evaluation), but what will really blow your mind is purity of the language (you can’t do side effects, i.e. you can’t write to the console anywhere you want, you can’t assign a value to a variable), the absence of cycles and declarativeness (you don’t write “how”, but write “what” is the task). But this is only at the beginning. Once you get the hang of it, Haskell turns out to be very expressive and concise. But he also has disadvantages - he is very complicated, VERY. Seriously, even after half a year, you will still have problems. I'm sure 95% of Haskellists won't explain in detail how Hello world works in Haskell,
main::IO ()
main = do
putStrLn "Hello world!"
Try Clojure, a dialect of Lisp. In addition to the FP paradigm, get the opportunity to use Java libraries.
First, Lisp for immersion in FP, preferably not the original, but one of its dialects, for example, Scheme, as, in my opinion, the most academic. Then Haskell for getting practical skills.
As for the gentlemen who talk about the impracticality of Haskell, I can advise you to abandon the way of thinking "if I don't know how to do something, then it can't be done in principle." Haskell has its practical application in real life no less than, for example, Python. The only problem is the rather high threshold for entering the language. High for a Canadian lumberjack who decides to complete a week-long course and become a highly paid programmer. As for programmers of an average level or a little lower, Haskell makes it possible for them to write fast, stable programs, spending significantly less time than in the same Java. I'm talking about real programs, and not about puzzles from olympiads about putting coins into piles, about programs in 200+ lines in Haskell, which translates into C ++ / Java 2000+ lines.
1. If you are interested/like one of the JVM or .NET platforms and you are interested/like Lisp, then you can choose from the following Lisp dialects:
- JVM : Clojure, Armed Bear Common Lisp or Kawa (scheme dialect)
- .NET: IronScheme
2. If If you use Emacs as an editor/IDE, then you should probably learn ELisp so that you can configure emax for yourself or write some useful plug-in.
3. And, finally, if you still have free time and want to delve into the functionality, then there is also: Standard ML, OCaml, Scala, F #, Neverle and other less well-known ones. Type in taste and color)
4. Languages written in Haskell: Elm (for the web), Idris and Agda. And if you are only interested in the web, then maybe you should look at Elm, which has Haskell syntax and seems to be simpler than Haskell (as far as I know). Also, a dialect of the HuskScheme scheme (it seems to be called so) is written in Haskell.
And who will say anything about Racket?
I read PLAI ( https://cs.brown.edu/~sk/Publications/Books/ProgLangs/ ) ,
like even without knowledge of Lisp (I scrolled through the first 100 pages of SICP, no more)
examples give a feeling of understanding how it is in C ++ implement (racket-plai dialect uses typing)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question