Hacker News new | ask | show | jobs
by marktangotango 4229 days ago
What are your thoughts on the link between go and oberon? Go is an aweful lot like oberon, but with curly braces and a lot of syntactic sugar imo. I've never read anything about pike citing oberon, but the influence on plan 9 is clear, imo.
3 comments

I think Lua is more related to the Oberon family than Go is. Lua's control constructs are reminiscent of Modula-2. What Lua has done with tables and modules is pretty elegant and I can see more of the highlights of the Oberon family in Lua than I do Go.

The few Oberon-like aspects I see in Go beyond the obvious ':=' operator are things like the 'range' keyword and methods. Both Oberon and Standard ML encourage composition a bit differently when it comes to functions and modules. You're lead to using more locally-defined functions in the context of writing a function. Modules are more at the forefront, with less hesitancy to define simple ones. Go I think more resembles an attempt to make a scripting language out of Plan 9's C and threading with a few odd-and-ends. I do very much like that it avoided objects.

However, I think even Modula-3 which appeared by the end of the late 80s already had things that Go right now is lacking. That said, I've used Go for some production projects. Some projects fit neatly into Go's standard library, which is the star of the language along with its ideas on tooling. The language itself I could take or leave.

> I think even Modula-3 which appeared by the end of the late 80s already had things that Go right now is lacking.

- Type safe enumerations

- Generics

- Exceptions

- Reference parameters

- Range types

- (real) Systems programming support

- An OS implemented in it (Spin) with support for POSIX APIs

Yes, Rob Pike mentioned Oberon here: http://talks.golang.org/2014/hellogophers.slide#21 and it's also mentioned in Go FAQ http://golang.org/doc/faq#ancestors
Go's method declaration syntax is based on Oberon-2.

And also how the packages work, is loosely based on how Oberon modules work.

Finally, unsafe has some resemblance with SYSTEM module.