Hacker News new | ask | show | jobs
by camus2 3456 days ago
Well I hope you succeed. Competition is good and in the "Go" space, there's need to be more competition to demonstrate the technical flaws of Go, or just give an option for those who want to quit an obnoxious and patronizing community. You should really be set on the type system and concurrency by now.
1 comments

There is no need to demonstrate anything.

Go is a good enough replacement for C, for user space applications.

With some improvements, even for more lower level tasks.

As for the flaws, anyone that had the pleasure to work with the Algol and Wirth family of languages is well aware of them.

Go is really more of a Java than a C replacement.
This sentiment is actually very interesting to me. I had (/have?) the same kind of sentiment toward Go, but when I spent time playing with it recently I realized just how close to C it actually is. Enough so that when someone says it's a C replacement, I can actually see where they're coming from/somewhat agree with them. And the reason for that is that Go actually seems to follow a lot of C conventions pretty darn closely, and not provide as high level of an interface as Java does. You're much more likely to work in raw "arrays" (aka: slices) in Go than you are in Java, it doesn't have generics, "classes" are structs that are defined very similarly to structs in C, error codes as return values, etc. The main differences that are adding to C as far as I'm currently aware are interfaces, the ability to add a "method" to a type (which is effectively the same as calling a function with a type as the first argument, except in the case of interfaces), and the garbage collector. All of which, to me, feel like a kind of evolution on C. A different path instead of C++ in a way. While people would argue that having a GC ruins what C is good at, it can also be viewed as a version of C that's much more memory safe, while still allowing you to dip into very low level if you need to.

...there's probably some other stuff I could say, and probably more coherently, but it's early (for me) and I kind of just wanted to get that thought out there. I hope it's at least a bit thought-provoking, or something. If not, well, my apologies for rambling at you ;)

The language was designed by an expert on Wirth-style languages plus the two inventors of C. They wanted to create minimal, useful language based on old techniques with only features they could all agree on. Pike used Oberon-2 back in the day, knowing its advantages. The C inventors naturally wanted it more like C. The result is a merger of these. The concurrency stuff was an exception that came from Limbo language Pike worked on.

The Wirth languages were categorized by a focus on absolute simplicity and safety with just enough complexity to make building large programs easier. They constantly added or removed features in various language revisions in a search of balance. His main metric was compile time: anything that took too long was kicked out. The result was these languages were easy to learn, compiled fast (100kloc a sec on good machine), rarely crashed, and ran reasonable speed. They had GC's but also allowed manual management. They were objectively better than C language because people could produce correct programs more quickly with same effort put in due to design.

http://www.projectoberon.com/

Modula-3, designed at DEC, was probably the best of that line given it's like a safer, simpler C++ with a subset closer to C. Here it is:

https://en.wikipedia.org/wiki/Modula-3

Used in SPIN operating system that let you live-load code into the kernel for acceleration safely due to type-safe linking on top of memory-safe interfaces. Quite a few commercial deployments. Didn't take off since C was too popular & programmers only went with C-like alternatives. Lots of vulnerabilities and crashes happened.

Another alternative was Delphi, which succeeded for a while. Way more productive and crash-resilient than using VC++. It fell away due to C/C++ popularity but Free Pascal community still maintains a variant of it. Their compiler targets a ton of platforms which was common for Pascal.

http://www.freepascal.org/

> The language was designed by an expert on Wirth-style languages plus the two inventors of C.

Did Dennis Ritchie have a hand in creating Go? I must have missed that.

While Ken Thompson's earlier B language no doubt had an influence on C, Dennis Ritchie is widely regarded as the creator of C, which is really rather different from B, borrowing more heavily from BCPL and Algol-68. As an early (and heavy) user of C (perhaps the earliest, besides Ritchie himself), I'm willing to concede that he had enough input on C's design to be called a co-designer or co-creator. But which other "inventor of C" played a role in the creation of Go?

I also find it hard to label Rob Pike as an expert in any kind of language design. An expert in windowing systems and concurrency, perhaps, but language design? Hell, no. Even his earlier design, Newsqueak, was more of an experiment in concurrency than in language design—and it notably was a collaboration with Luca Cardelli, an expert in ML and OOP who also worked on Modula-3, and whose influence can be seen in Modula-3's several very ML-like constructs. Articles like this one[1] by Pike only serve to reinforce my thoughts that he, though a rather smart guy otherwise, is really rather ignorant about language design and about the role of types in programming in general.

> The Wirth languages ... had GC's but also allowed manual management.

None of Wirth's languages had GC until Oberon, as far as I'm aware. And spiritual successors by other groups, like Object Pascal and Ada, never really picked up on GC, either (Ada had GC as an optional part of the standard, but was removed in the latest standard because it was so rarely provided by implementations). As far as I can tell, Modula-3 is the only other "Wirth-style" language to provide GC.

Modula-3 was indeed a great language, and I think it's a real shame that it didn't get picked up more widely. At a time, it had several really solid implementations, and the language's definition is very short while still providing a plethora of useful features for programmers. The silver lining is that it was, at least, a very influential language, despite its limited adoption.

Oberon, on the other hand, was a very spartan language that offered little in terms of features, and it exhibited that Wirth really didn't grok OOP at the time he designed it (which, if I recall correctly, is something he later admitted, though I'm having trouble finding a citation at the moment). Some of Oberon's issues were fixed in later versions of the language, but some of its issues were also "doubled down" in later versions, as well.

> Another alternative was Delphi, which succeeded for a while. Way more productive and crash-resilient than using VC++.

Delphi was indeed a real alternative for a while, and while you're right that it was more productive than VC++, that's not saying much. Later versions of Delphi grew to C++ levels of size, complexity, and hairiness, and that's reflected in Free Pascal's implementation, as well. It's something that I've lamented on more than one occasion because I remember how great it was and feel as though it could still be great with a bit of streamlining.

[1]: https://commandcenter.blogspot.com/2012/06/less-is-exponenti...

> As far as I can tell, Modula-3 is the only other "Wirth-style" language to provide GC.

Besides Oberon, there was Oberon-2, Active Oberon, Component Pascal, Zonnon, Modula-2+, Modula-3.

All of them with roots actually on the Xerox PARC workstation that used Mesa/Cedar.

"Did Dennis Ritchie have a hand in creating Go? I must have missed that."

Oops. You got me on my bad memory there. I misremembered Griesemer. The C language was originally just B modified with structs to try to port UNIX from assembly. Also, the limited keywords & "programmer is in control" philosophy came straight out of B. The details are in this nice Vimeo that traces its development going through papers they presented:

https://vimeo.com/132192250

"An expert in windowing systems and concurrency"

Even if we drop "language" expert, my comment had him bringing in concurrency mainly. I didn't know Cardelli started with Newsqueak, though. Makes sense given stuff as good as Modula-3 rarely comes from a vacuum.

"Articles like this one[1] by Pike only serve to reinforce my thoughts that he, though a rather smart guy otherwise, is really rather ignorant about language design and about the role of types in programming in general."

Well, see, it's been given a test. The Concurrent Pascal, Ravenscar, and Eiffel SCOOP approaches to concurrency were all very effective for what they're designed for. I've been sitting on the bench on Go watching it from afar to see what Pike's method does. So far, I see a lot of people griping about concurrency errors that didn't happen in SCOOP. Meanwhile, Rust has improved on things in a new way. Your characterization of him as an experimenter more than an expert may be right.

"None of Wirth's languages had GC until Oberon, as far as I'm aware. "

All of his languages except the first two that he started with. They made a lot of languages. It's kind of a strength and weakness of theirs as doubling down on a great one might have accomplished more. Might given Cardelli did without much direct impact.

"Oberon, on the other hand, was a very spartan language that offered little in terms of features"

So was early C. It's why I bring up Modula-2 or Oberon in comparisons as nobody is writing or deploying Modula-3 or Ada on a PDP-11. I'm not a fan of Oberon except for bootstrapping better languages or for minimalist hardware. Even then I'm more PreScheme.

"Later versions of Delphi grew to C++ levels of size, complexity, and hairiness"

Snowballs rolling into avalanches. Common ill in tech although I think it's human nature or economics more than anything. It takes a cathedral model that prioritizes just right amount of complexity to avoid. I just subseted languages like embedded people do to avoid the shit. Until I had to debug a 3rd party library. (shakes head)

Research Oberon and Modula-3, just as two possible examples.

You can go even further back into history of computing and check the Mesa/Cedar workstation at Xerox Parc.

Modula-3, at least, had generics.
Maybe it makes sense. It is replacement of Java because convenient GC, decent runtime and networking/http/ssl/xml/json libs comes standard. This is where is Java is mostly used as backend server side stuff.

It is replacement of C as in low memory usage, decent level of control over memory layout, no overengineered abstractions, no classes, no generics, no exceptions, fewer concepts to grasp etc. It does not need VMs and generates executables to directly run on machines.

Not to those of us that enjoyed using OSes like Oberon.
>Go is a good enough replacement for C, for user space applications.

Are you sure you are not describing Rust?

Go is based on Oberon: a family of simple, safe languages that were used to write OS's. Started with Modula-2 in Lilith project. At one point, the machines ran ETH University. By Oberon, they got a GC but could also do unsafe manipulations for hardware interfaces or performance. Forced you to put it all in modules declared SYSTEM ("unsafe").

The neat thing about the OS was that it and its compiler were simple enough for students to understand that they regularly ported or improved it a few months at a time. It's also one of the most, well-documented OS's in existence.

http://www.projectoberon.com/

That Go is basically a modified Oberon means Go, currently or with some modification, could be used for low-level, systems code up to operating systems. Even with a GC since the Oberon OS's are written in GC language. Most recent, graphical one is A2 Bluebottle if you want to look it up.

Since when is Go "based on Oberon"? Pike himself claims that it was "based on C", with obvious influence from his own work on Squeak and Newsqueak.
The last history people here gave me had him describing the joy of programming in the safe, fast Oberon-2. And wanting to re-create that with the new language. Resulting language is very Wirth-like in style, esp simplicity, compile speed focus, and safety. Modified with C syntax, concurrency from Limbo, and I dont recall what else. Clearly way closer to Oberon-2 or Modula's than to BCPL like C copied/extended.
The method definition syntax, package model and unsafe package are taken from Oberon-2.

You missed that Robert Griesemer is also part of the Go team.

I didn't miss that at all. According to Pike, it was actually Griesemer's idea to start with C.
No, please research Oberon and read the Project Oberon book.
> As for the flaws, anyone that had the pleasure to work with the Algol and Wirth family of languages is well aware of them.

I just don't want to have to deal with a bunch of second guessing judgmental jerks anymore. Nobody in the Crystal community is going to go after me for something "not idiomatic" I published.

Go is not on my top 10 languages that I would use, but still I see some value on it being used.

What I meant with that remark was that those languages already had fast toolchains and were more expressive.

So in this regard I also appreciate Crystal, specially since RubyMotion decided to focus on mobile.

Ok, for my purpose I would be far less interest in programing language which has no idioms, no critical feedback, that is basically a mutual admiration society.