Elm与ClojureScript相比如何? [英] How does Elm compare to ClojureScript?

查看:86
本文介绍了Elm与ClojureScript相比如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经意识到,使用Backbone.js面向对象的MVC模式进行GUI编码变得非常复杂,并且正在研究其他范例。 MDV FRP ECS ,我的天。

I'm reaching a point where GUI coding with Backbone.js object-oriented MVC pattern is getting quite complex, and looking around at other paradigms. MDV, FRP, ECS, oh my.

榆木 ClojureScript ?它们在哪里重叠?

How does Elm compare to ClojureScript? Where do they overlap?

这两种语言都与JS编译成JS的语言截然不同。我了解Elm是一种功能性反应式编程(FRP)语言。 ClojureScript不一定是FRP,但您可以使用它来进行FRP。 Elm使用Haskell和ClojureScript使用JVM进行编译,因此这两个都是Node商店的额外要求。

Both are languages very different from JS that compile to JS. I understand that Elm is a functional reactive programming (FRP) language. ClojureScript isn't necessarily FRP, but you can do FRP with it. Elm compiles with Haskell and ClojureScript with the JVM, so both of those are extra requirements for a Node shop.

也许它可以简化为 Clojure与Haskell

推荐答案

两者都迫使您使用比纯JS更声明性/功能性的编程样式。 ClopureScript更像是JS的替代品,而Elm更像是整个Web开发堆栈(HTML / CSS / JS)的替代品。

Both force you to use a more declarative/functional programming style than pure JS. ClojureScript is more like a JS replacement, whereas Elm is more like a replacement for the entire web development stack (HTML/CSS/JS).

其他区别:


  • Elm语法更类似于Haskell

  • ClojureScript更接近传统的Lisp语法

  • Elm针对时变值(Elm中的信号)进行了高度优化

  • ClojureScript更成熟,您可以找到一些不错的开发工具(Eclipse插件,LightTable等。)

  • Elm是静态类型的,ClojureScript是动态类型的

  • Elm syntax is much more Haskell-like
  • ClojureScript is much closer to traditional Lisp syntax
  • Elm is highly optimized for time-varying values ("signals" in Elm)
  • ClojureScript is more mature and you can find some sweet development tools for it (Eclipse plug-ins, LightTable, etc.)
  • Elm is statically typed, ClojureScript is dynamically typed

希望这会有所帮助。我仍在学习这两种语言,所以我可能错过了一些东西。

Hope this helps. I'm still learning both of these languages so I may have missed something.

这篇关于Elm与ClojureScript相比如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆