开发者

How to learn Erlang framework? [closed]

开发者_开发问答 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

I had two question about Erlang.

  1. Is design pattern of concept to be suitable for use in Erlang? Want to understand the architecture quickly.
  2. Could you recommend any great framework and how to learn? what view-point to explain this erlang framework.

Thanks for you.


One at a time, where I try to answer questions not answered in "Primer thread":

  • Design patterns: All languages have their own set of common idioms for solving specific problems. These are often called "Design Patterns". It turns out however, that these cannot be hoisted across languages. A DP for, i.e., Java or C# might not be applicable at all in Erlang. It also holds true vice versa: A specific idiom in Erlang might have no use in C#. When learning Erlang you should keep an open eye out for the patterns, but don't expect to be able to use existing patterns you know from other systems.

  • On learning Erlang: Keep an open mind. And do not under any circumstances try to understand it by relating your known OO concepts to the language. Don't try to find the concept of class, interface and object in Erlang. They are not there. I've seen this mistake when learning Erlang and when learning Haskell (where the misunderstanding is usually around Type Classes). A new language requires a new approach and new problem solving skills. It is like learning a new instrument: Rhythm and Harmonics carry over, but there are things which do not.

  • Erlang does not really have any "framework". The closest you can come to it is the set of standard generic behaviors which are part of the OTP built into the standard library. A behavior defines a generic construct, a server say, which you then can specialize to your needs. The advantage is that a lot of the robustness stuff is "baked in" into the behavior so when you base your code on it, you get these things for free.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜