码迷,mamicode.com
首页 > 编程语言 > 详细

为什么用clojure作为storm 的主要开发语言

时间:2017-08-16 21:52:20      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:ever   complete   ensure   asi   cti   wan   tag   access   find   


Why you choose Clojure as the development language of Storm? Could you talk about your long practical experience about using this language (like its advantages and disadvantages)? Which feature won‘t appear in the Storm, if you were not using Clojure?

Clojure is the best language I‘ve ever used, by far. I use it because it makes me vastly more productive by allowing me to easily use techniques like immutability and functional programming. Its dynamic nature by being Lisp-based ensures that I can always mold Clojure as necessary to formulate the best possible abstractions. Storm would not be any different if I didn‘t use Clojure, it just would have been far more painful to build.


What do you do to improve your skills as a programmer?

I get better by doing a lot of programming and trying new things. One of the best ways to become a better programmer is to learn new programming languages. By learn I mean more than just learning the syntax of the language, I mean understanding the language‘s idioms and writing something substantial in it. For me, learning Clojure made me a much better programmer in all languages.

还有邮件组里的[2]:
"Is Storm mostly written in Java?"

If you look at the languages graph on Github, it says that Storm is
"64% Java". However, this is inaccurate because those numbers include
the Java code generated by the Thrift compiler. If you exclude the
generated code, you‘ll find that Storm is over 50% Clojure in terms of
line count. In terms of functionality though, Storm is around 98%
Clojure. The Java code I wrote is mostly interfaces and small classes
that a user of Storm would encounter in the public API (Java is, ahem,
verbose).

"Why isn‘t Storm written completely in Clojure?"

I want Storm to be as accessible to as wide an audience as possible. A
user‘s language preference or constraints shouldn‘t prevent them from
being able to use Storm to solve their realtime computation problems.
This is why I chose to define Storm‘s main interfaces in Java, and
this is also why Storm supports using any language (including non-JVM
ones) on top of Storm. That said, Storm has a Clojure DSL for
programming topologies which is what I personally use for developing
topologies.

Clojure was a magnificent language to use to build Storm. Storm is a
complex, intricate system, and Clojure helped a great deal in managing
the complexity of the implementation. 

为什么用clojure作为storm 的主要开发语言

标签:ever   complete   ensure   asi   cti   wan   tag   access   find   

原文地址:http://www.cnblogs.com/oxspirt/p/7375534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!