HN user

username3720

17 karma
Posts0
Comments4
View on HN
No posts found.

I'd strongly advise people to read K&R C as maybe their second or third book and mostly for historical purposes and not because it's particularly great for learning the language. The exercises are quite fun, however.

You will be better served by reading a more recent (C99) and carefully considered book such as K.N. King's C Programming: A Modern Approach.

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.

The Oberon/Modula-2 family happens to be among my favorite languages. It's one of the easier languages to implement and Amazon happens to have cheap Modula-2 compiler books. Wirth's own Compiler Construction book is free, though it's the definition of terse. I rather liked Julian R. Ullmann's Compiling in Modula-2 and John Elder's Compiler Construction.

There's still interesting work that is out there to rediscover involving the family. Luca Cardelli wrote a rather good paper on typechecking in Modula-2[1]. More recently there's projects like Modula-2 R10[2] in the works, which could prove to be a rather fun language to work with.

I thought University of Cambridge's track for teaching Standard ML to C via Modula-3[3] was a fantastic idea. (I also have a lot of love for SML.) By learning types and modules via SML or Modula first, it will ease understanding more advanced C concepts. C's weaker typing and implicit conversions make the value of types less clear and easier to ignore. I feel that C's headers and abstract data type construction are clunkier than they have to be and also devalue the idea of modules.

I would love to see renewed interest in Modula-2 in particular. The death of the commercial compiler industry has neglected it. It eschews garbage collection and I think it resembles a fixed C. For roughly ten years General Motors used it for embedded work.

Another excellent resource: http://oberon07.com/

[1] http://lucacardelli.name/Papers/BasicTypechecking.pdf [2]: https://bitbucket.org/trijezdci/m2r10/src [3]: http://www.cl.cam.ac.uk/~pr10/publications/plc93.pdf