in Java thanks to its interactive development, simplicity, and powerful tools such as macros. You can be very productive with Clojure, much more than e.g. For beginners Note: Clojure and productivity Instead, we change our language to fit the thoughts. We no longer need to change our thoughts to fit the language. The closer that a language can express (or in the case of macros, be modified to express) human thoughts, the closer we get to a program that we can understand natively. Other languages take the opposite approach, running close to the “human metal” - our minds. Some languages run close to the “metal”. This would be a problem, except that ClojureScript comes with something better: macros. ĬlojureScript, like JavaScript, doesn’t come with pattern matching. Moreover, the entire pattern of thought begins at a much higher level, seeking to recognize patterns even before fully understanding the solution. These options not only allow one to engage in high-level forms of abstraction, but actually encourage this kind of thinking. Instead of seeking to avoid the danger of using one bug-prone function, it provides three types of switch statements, each suited to different kinds of control flow. That makes the important advantages of ClojureScript hard to perceive, as the essential difference belongs in new patterns of problem solving rather than new syntax and grammar.ĬlojureScript does the opposite. Nate Wildermuth: ClojureScript and the Blub Paradox You always get help in the official Slack organization, one of the mailing lists, and other places. It has also core.async for asynchronous/reactive programming, clojure.spec to document, verify, use and test your data, and much more.Ĭlojure has also an active and friendly community. No more learning a custom API for every library! (Though you still need to learn and understand its data.) No matter whether you use Clojure core or a library, they use raw Clojure data – that you can access and transform through the core functions you know and love. When necessary, you can use macros to remove duplication and fit the language to your problem. It has a powerful library of data transformation functions that can be effectively combined together. It has performant immutable data structures that make many concurrency-related defects impossible. See the short screencast Interactive programming Flappy Bird in ClojureScript for an idea. You cannot imagine the power and the insanely short feedback loop until you experience it. (For details see the Clojure Rationale and talks by Rich Hickey such as Effective Programs – 10 Years of Clojure.)Ĭlojure enables interactive programming – you can connect a REPL to your application and develop it and interact with it from code while it is running. It has been designed after years of painful experiences with production systems in Java, C++, Common Lisp and others to avoid the main sources of complexity and maintenance headaches. – paraphrase of David Nolan in ClojureScript NextĬlojure (and thus ClojureScript) is one of the best designed programming languages, it is really well thought-through and great care is taken to ensure that the pieces do each a different thing yet fit perfectly together. Why Clojure(Script)?Ĭlojure(Script) is simpler yet more expressive (than Java(Script))
0 Comments
Leave a Reply. |