Lisp - Is this good for web programming / applications (interactive)? How is ruby? How is php?

Is Lisp useful for web programming / applications (interactive) like Ruby and php?

The following should be considered:

  • Ease of use
  • deployment readiness
  • Difficulty (especially for a novice programmer)

(Edit) Especially I had in mind Common Lisp after reading Paul Graham 's essay . Would be my first programming language. In this regard. Will it come in handy?

I have heard that the macro function of Clojure is not as powerful as Common Lisp, and therefore I am trying to learn Clojure. He teaches programming and is very strong.

+6
source share
5 answers

Lisp is a family of languages, not one language. To answer your question somewhat, yes, web frameworks exist for various Lisp dialects, such as UnCommon Web for Common Lisp, and PLT Racket ( UnCommon Web dialect) also has a tutorial on its website:

http://docs.racket-lang.org/continue/

But one dialect of Lisp where you will see quite a lot of web development right now is Clojure, because it can use existing libraries and the Java infrastructure. Here is a list of projects, and this is not comprehensive:

It would be much more, but I think you understand this idea. As for the Clojure web applications in the wild, the Clojure 4Clojure learning site would be an example, and you can check the source code on GitHub (I sometimes contribute to this):

As you can see, quite a lot is happening in terms of Clojure and web development. It may not always be a smooth swim, but people work fast to improve their experience. Using the existing Java infrastructure has its advantages, such as being able to be deployed in the Google App Engine, etc.:

http://www.infoq.com/articles/deadline-clojure-appengine

Hope that answers your question somewhat ...

+10
source

I have almost no experience with PHP or Ruby. However, I can say that it’s quite simple to write a web application using Hunchentoot, CL-WHO and one of the many database backends (Postmodern, CL-SQLite, CLSQL or even a simple serialization library such as USerial or Rucksack).

There are also frameworks like Uncommon Web or Weblocks, but I haven't tried them yet.

+7
source

There's a funny quote from Kent Pitman

"... Please do not assume that Lisp is useful only for animation and graphics, AI, bioinformatics, B2B and e-commerce, data mining, EDA / Semiconductor applications, expert systems, finance, intelligent agents, knowledge Management, Mechanical CAD, Modeling and Modeling, Natural Language, Optimization, Research, Risk Analysis, Planning, Telecom and Web Authoring just because this is the only thing they listed. "

And look, "web authoring" even did it on the list!

Lisp is good for web programming because it is so flexible, and the s-expressions that make up Lisp forms have some similarities with HTML. To find out what I mean, check out Lisp for the web . Notice how he writes the macro to basically create a domain-specific language for creating web pages - instead of defining functions, he now defines pages! This DSL concept is also evident in the CL-WHO library that it uses, which allows you to write Lisp, which turns into HTML.

Paul Graham managed to overturn his own decision, creating what later became Yahoo! Keep Lisp in general (and write more success after that), and since then there have been many packages .

Weblocks is the general Lisp web infrastructure, which seems to me the most active at the moment. There, a video about this is discussed in the Twin Cities Lisp group. UCW is very similar, but right now I don't see a lot of action (please excuse me if I'm just looking in the wrong place). The blog post about why the creator created Weblocks is pretty enlightened: he basically wrote enough Lisp so he never had to deal with HTML, AJAX and JavaScript again. This may be an exaggeration, but the fact that he can even do some of them should answer your question.

+2
source

This is a stubborn, but also the nature of the issue, so here is my trick.

I would not recommend a beginner to program to start with a functional language, especially Lisp.

T concepts in functional languages ​​and especially Clojure are more advanced and the power it gives you, you may not need your first steps in website development.

So, since you are new, then my answer will be negative, Lisps is not so easy to learn and use as Ruby and PHP.

0
source

For a web application, structure is more important than language. If the language is very powerful, but it does not have good web frameworks, developing a web application immediately becomes difficult and is very difficult.

Think of a ruby ​​without a frame, people are starting to like because of the structure of the railways. This is the same as java, using only a servlet without Jsp or another web framework development application would be terrible.

Now we come to your point, we always use the relative one easily - I could not find the end to the end in the LISP family, such as ruby ​​or python. But I found that Clojure reduces server-side complexity. Deployment - it depends on the server, and not on a language such as a Java server, war or ear file is required. Learning is also relative, but the tools help debugging or the idea several times. But most LISP families do not have a good debugging option.

0
source

Source: https://habr.com/ru/post/887006/


All Articles