Erlang
started 8/28/2000; 2:46:45 PM - last post 8/29/2000; 1:09:50 PM
|
|
Ehud Lamm - Erlang
8/28/2000; 2:46:45 PM (reads: 638, responses: 4)
|
|
Erlang |
Erlang is a functional language, used by Ericsson to build real-world applications: esp. complicated fault tolerant, distributed systems.
I found the language interesting, though I never really used it to build something. I also enjoyed the fact that Erlang has Prolog as one of its sources of inspiration.
Making it open-source was a very smart and encouraging move by Ericsson. It is interesting to note, the unsurprising fact, that open-source is esp. useful for new, off the mainstream, language tools.
Posted to "" by Ehud Lamm on 8/28/00; 2:48:29 PM
|
|
|
|
Chris Rathman - Re: Erlang
8/28/2000; 6:11:26 PM (reads: 684, responses: 3)
|
|
I found the most unique aspect of Erlang was how incredibly cheap it makes threads - fast context switching and low overhead. Functional languages should, by their very nature, be easier to develop concurrent processes because you really don't have to worry about all those synchronization concerns that are present in the imperative languages.
I really didn't do much with Oz, but I do vaguely recall that they started off with a concurrency model that more closely resembled the lightweight threads of Erlang. Problem was, though, that the mixture of imperative and logic paradigms meant that they had to scrap this method and go to the more classic style used for synchronization. It just struck me that the ease with which concurrency is achieved in Functional Programming is lost the second that you start putting imperative features into the language.
|
|
andrew cooke - Re: Erlang
8/28/2000; 9:20:10 PM (reads: 746, responses: 2)
|
|
[...] Functional languages should, by their very nature, be easier to develop concurrent processes because you really don't have to worry about all those synchronization concerns that are present in the imperative languages.
Does that imply that Erlang is pure (hope I have the right term - no reassignment to variables)? Is there simply no synchronization at all?
|
|
Chris Rathman - Re: Erlang
8/29/2000; 6:30:47 AM (reads: 809, responses: 1)
|
|
Erlang is not considered to be a pure functional language because it is not totally free from side effects. But it does use write once variables - though the the combination of the processes, messaging and tail recursion does allow you to skirt this limitation. Anyhow, Erlang is definitely an FP language, just not as uncompromizing in approach.
I think I read an opinion somewhere that "everything is a Process" in Erlang (a correllary to everything's an object in Smalltalk). The synchronization issues that you have with imperative languages is just not nearly as severe. All access to and from a process (aka thread) is via messages which act as events. These events can be built up to provide synchronization if need be - along the lines of semaphores. Since variables are write-once, you don't have to worry about them changing in mid operation.
|
|
Ehud Lamm - Re: Erlang
8/29/2000; 1:09:50 PM (reads: 876, responses: 0)
|
|
Even in procedural, imperative, languages being side effect free is useful. A good function (as opposed to procedure) usually just computes. This helps readability and reduces the chance of problems (e.g., in languages with unspecified order of evaluation).
This seems so trivial to me that I am amazed how many find this idea objectionable, or remarkable. I think this comes from years of miseducation using C, which has some beautiful features, but which doesn't include some basic notions: like the distinction between functions and procedures and nesting.
It seems that since Pascal is regrarded as so obsolete that the only way to teach people about functions is to make them study FPL...
I remember this guy who told me 'Pascal is really bad. I only use Delphi.' He wasn't being funny, and didn't mean that Delphi is a newer version. He really thought it is something completely different...
|
|
|
|