lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On 21 March 2014 15:38, Jeremy Ong <jeremycong@gmail.com> wrote:
>> Elucidate me. What were Go's designers aiming for? A worser Erlang?
>>
>> My point is that all the stuff they're going for is great and all, but
>> there's absolutely nothing unique about what they're trying to
>> accomplish as far as I can tell, and there are already options out
>> there to do what it does. The language semantics are pretty
>> uninteresting and lackluster compared to mutable types in Rust,
>> abstract data types in Haskell, process-oriented shared nothing actors
>> of Erlang, etc. It's just a prettier java maybe.
>
> IMHO they were aiming for something of _practical usability_. This
> doesn't necessarily mean being unique or presenting new concepts that
> will make it into programming language theory journals. Most of the
> concepts the Bell Labs guys brought together when they made Unix
> already existed in other operating systems at a time, often in more
> sophisticated ways (well, even the pun in its name reflects this
> thinking: Unix < Multics).
>
> I think they looked at the world around them, realized that in spite
> of all these advances that get PL people excited, most people out
> there are still using stuff like C to get the work done and tried to
> come up with something practical for this audience. I think it's a
> very worthwhile goal.

Exactly. They did some kind of C with a few syntactic fixes
(type signatures being the main one) and interesting concurrency
primitives (goroutines and channels).

Compared to Erlang, they are worse at reliability but better at
interoperability and raw performance for computation.

Rust is awesome for its type safety and ability to run without
a GC or frontend, which makes it suitable to write dynamic
libraries for instance. Rust will be a good alternative to C++,
and for lots of use cases of C++ Go isn't.

On the other hand, Go is simpler conceptually, probably easier
to learn, and usable in production today. I think Rust is still
too unstable.

All in all this makes Go a very good system language, especially
to write distributed systems. Just a few examples of those:

 - http://iris.karalabe.com/
 - https://github.com/coreos/etcd
 - https://camlistore.org/
 - https://github.com/ha/doozerd

If I had to teach an introductory course in distributed systems
today I would probably teach it in Go. In that respect I see Go
as the Python of the distributed world: probably not the best,
but the simple syntax and good toolbox make it perfect for
beginners.

Another advantage of Go is compilation speed, but I don't think
most people care about that too much except Google.

-- 
Pierre Chapuis