zoukankan      html  css  js  c++  java
  • 为什么用clojure作为storm 的主要开发语言


    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. 
  • 相关阅读:
    数据结构与算法题目集(中文)7-25 朋友圈 (25分) 并查集
    数据结构与算法题目集(中文)7-24 树种统计 (25分)
    数据结构与算法题目集(中文)7-23 还原二叉树 (25分)
    数据结构与算法题目集(中文)7-22 堆栈模拟队列 (25分)
    数据结构与算法题目集(中文)7-21 求前缀表达式的值 (25分)
    [SDOI2018]反回文串
    ARC 064 F-Rotated Palindromes
    AGC014-F Strange Sorting
    AGC011-E Increasing Numbers
    AGC011-C Squared Graph
  • 原文地址:https://www.cnblogs.com/oxspirt/p/7375534.html
Copyright © 2011-2022 走看看