Answer the question
In order to leave comments, you need to log in
What exactly can knowledge of the Lisp language give a programmer?
Hey $(Habrauser)!
Maybe someone will find the question silly and please don't kick me, but be patient and answer or just follow on ;)
My vision of lisp-programmers:
Lately I keep looking towards Lisp. In view of the fact that I am a purely practical person, I really do not want to do anything in vain. Looking at someone learning various Haskel, Lisp, Prolog, etc, they seem to me to be people who have a lot of free time and want to learn something cool.
Essence of the question: How right am I?
Clarifying questions: This is really studied only with the aim of "turning the brain" a little in the other direction, in order to look at one's craft, but software development is still a craft, a little bit from a different angle? Or does it still give real practical meaning and allow you to solve problems at work (freelancing, uncle, startup)?
I'm interested in real practice!
PS:
Recently I was asked “Why should I study python at all?”, I answered “It’s easier to write log parsers, small source code analyzers written in C ++ or auto-creation of headers, or replacing any string data in C / C ++ code.” In other words, I can give a real specific situation where this or that tool that I use was useful to me. With exactly the same mindset, I'm looking for people who know and use Lisp to show me their experience.
Answer the question
In order to leave comments, you need to log in
Each language has a set of development approaches that are most convenient to use in it. The experience of using languages with different development paradigms changes thinking - you can formulate the problem in different ways.
This, in the end, turns out to be useful when developing in other languages.
From a practical point of view, Lisp is of little interest now. As far as I can see, Scala is more likely to be used in practice now.
In general, functional languages are very interesting. Their development for a more or less experienced programmer turns out to be difficult (it is even easier for a beginner to master them), due to the fact that many of the usual approaches in them turn out to be inconvenient. But after mastering, they turn out to be even easier to develop than object-oriented and procedural ones.
Results:
1. Mastering functional languages is useful because it will increase the speed and quality of development in other languages (although there will be an unpleasant side effect - they will make you sick when it turns out that a thing implemented in several lines in Haskell requires several pages of nonsense in C ++).
2. They are very convenient to use as scripting languages inside more complex products (like the same AutoLISP).
3. In large "enterprise" projects, it is unrealistic to use them due to the fact that there are few developers who are familiar with them, and for business, the replacement of employees is critical.
4. In small projects that are written alone - after mastering, they can give a noticeably faster project implementation speed. Accordingly, if the customer doesn’t care what was done, as long as it works and works well, and the payment is project-based, the functionalist can simply earn more.
5. Some functional languages, such as Haskell and OCaml, have a very interesting and powerful type system, which at the same time is not as confusing as in Java, but at the same time very rigid, and cuts off a lot of potential errors.
6. Well, and one more thing - for example, JavaScript and Perl have a number of tools that are familiar to functional programming. Knowledge of at least one functional programming language will allow you to write more beautiful code in these languages.
I wrote a lot of letters here about the fact that tools are selected either for the task, or those that a person already owns, but I decided to reduce it to the point that it’s still worth studying - it helps to open up new horizons - even word processing in awk / sed / perl, even layout in TeX, even “Hello, World!” on brainfuck'e or automating actions on the shell or managing a huge AD domain through PowerShell.
I know that Lisp in one form or another is used as a language for automating various actions. Probably the most striking example is AutoLISP, which is available in many CAD systems (or maybe not already, I’m not aware of the situation at the moment, I haven’t been doing this for a long time). There are also many other tools that use Lisp.
I take attempts to master Lisp, Haskell or something like that purely as a mental warm-up.
I chose the Lisp family to study: for this reason , for this reason
,
and for this reason (knowing one of the Lisps, it will be easier to configure the Emacs IDE).
2 Alukardd :
I agree, but my level of English allows me to read only clarifying data on the API, and not free reading of this or that literature. While reading the Russian translation of the wonderful book Practical Common Lisp . But I don't see the answer!
Lisp has a very unusual syntax. And it is hard to read :( Moreover, in the course of learning the language, readability still remains low - there is a lot of informational garbage - the very brackets for which they do not like it :)
Look better at Haskell. It also has cryptic syntax at first glance, but over time it begins to seem very concise and simple.
In general, it has only two of the biggest difficulties:
1. to understand the concept of "monad", it is unusual, although you can write code without complete understanding, but it will be difficult to read someone else's code, and writing _good_ code will not work;
2. realize that he is "lazy", and what are the consequences of this;
I won’t tell you about LISP, but my acquaintance with FP and Haskell helped me understand some things that previously seemed strange: for example, what the array_map, array_walk functions do in PHP - they are very much out of the majority. I also stopped looking strangely at the code using JQuery (when I first met, I was somehow confused by the use of anonymous functions in handlers - then I did not know that there were anonymous functions).
After re-reading this article , I can say that for a JavaScript scripter, the real profit is to write less in a functional style (and if you take the compose function from Underscore, for example, then it’s much less) and everything is somehow more elegant.
As an option, you can look at the book PLAI:
Programming Languages: Application and Interpretation
(c) Shriram Krishnamurthi
https://cs.brown.edu/~sk/Publications/Books/ProgLangs/
in terms of implementing your own scripting engine to embed in your the programs
are actually used there in Lisp, and Racket, but the syntax and ideology are similar, and typing gives a feeling of how to implement it in C ++
It's worth trying to spend a couple of hours introducing Clojure (a modern implementation of Lisp) through the exercises on the 4Clojure site . And understand - yours or not yours. I immediately fell in love with this Polish Lisp notation.
In practical application, there are also no problems, because. Clojure compiles to both the JVM and JavaScript.
From an aesthetic point of view, for all sorts of brackets, paredit and parinfer have long been invented, which arrange them for you in the IDE.
And just reading the history of Lisp is very exciting. For example, to find out that the Garbage Collector was invented in Lisp long before the advent of Java.
And he also has all sorts of magical things like a remote REPL - when you can remotely connect to a running project on the server and change the code on the fly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question