Live data from Hacker News

Why Go and Rust Are Not Competitors (2015)

dave.cheney.net

61–70 of 102 posts

Re: Why Go and Rust Are Not Competitors (2015)

#61

"Rust competes for mindshare with C++ and D for programmers who are prepared to accept more complex syntax and semantics (and presumably higher readability costs) in return for the maximum possible performance. For example, micro controllers, AAA game engines, and web rendering engines. Go competes for mindshare in the post 2006 Internet 2.0 generation of companies who have outgrown languages like Ruby, Python, and N…

One of the reasons for the confusion from those of us on system programming side is that Go inherited mostly from Oberon...

https://blog.learngoprogramming.com/about-go-language-an-ove...

...that was used to build OS's and other system stuff. Here's a brief history I just submitted and the official pages.

https://news.ycombinator.com/item?id=15704806

http://www.ethoberon.ethz.ch/

http://www.projectoberon.com/

The Delphi product and the Oberon offshoot Component Pascal were used as C++ replacements. Here's an IDE for Component Pascal:

http://blackboxframework.org/index.php?cID=home,en-us

So, the point is that it's a variant of a Wirth-style language for writing operating systems and low-level apps. With that, many of us figured it can also target the same thing. It might need some modification in its runtime or something if not originally aimed at it. I see no reason why a language stronger than Oberon couldn't be used for at least what Oberon was used for, though. As partial evidence, people are already writing prototypes for OS's in in.

https://news.ycombinator.com/item?id=14537691

https://www.phoronix.com/scan.php?px=MTY5OTQ&page=news_item

Throw in real-time or selective GC's as a modification to get it closer to taking over a lot of stuff that C would be doing. There's also nothing stopping the low-level code from being straight-up unsafe with checks added by programmer since that's already the baseline with C. One would get a more pleasant language that was at least memory-safe in other components that could take a GC. House OS is an example where the H Layer wraps the unsafe, lowest-level parts of the kernel of an OS mostly written in type-safe Haskell.

Re: Why Go and Rust Are Not Competitors (2015)

#62
post #14
post #4

Earlier quoted context omitted.

>> make some things that needed to be done in C++ or Rust viable in Go. like "micro controllers, AAA game engines, and web rendering engines"? I highly doubt it! Swift 5+ might have a chance but Go has none(as it is now).

Many controllers are not hard-realtime. Think e.g. of microwave ovens or smart locks. Often you might be willing to trade a 10ms GC pause of Go for much lower chances of memory corruption or crashing compared to C.

>> Often you might be willing to trade a 10ms GC pause of Go for much lower chances of memory corruption or crashing compared to C.

I believe the C/C++ developers will look for a Rust-like solution(even if I don't like Rust) rather than Go if crashing is an issue. Go doesn't solve the crashing issues. It has its own crashing issues(e.g. dereferencing nil pointers , deadlocks, data-races, nil and nil interfaces etc). If the GC is not an issue they can choose any other GC language so Go is not that special anymore in this regard. The truth is that Go has its own niche and that's web services.

Re: Why Go and Rust Are Not Competitors (2015)

#63
post #32
post #27

They are both being used, where C and C++ were the only alternative Some of the points to be made here is that C and C++ are being used for a very wide range of applications So if you do compare Go and Rust, you will find distinct technical advantages and disadvantage Rust/Go are currently the C/C++ alternative

But it seems to me that Go is used especially by non C/C++ devs.

Of course it is and it makes sense. Learning safe and correct C/C++ is a big challenge. You can do this, or write it in Go. It will be 80% as fast but take you much less time. It will also be safe.

Once you’ve learned all of the ins-outs of C/C++ then you don’t have an incentive to use Go to replace them. When you don’t need performance you can use a scripting language like ruby or python. I see this happen often.

Re: Why Go and Rust Are Not Competitors (2015)

#64
post #13
post #5

Earlier quoted context omitted.

They forgot the mindshare of PHP users. The tradeoffs Go makes are rather similar (simplicity, ease of deployment vs expressivenes and consistency).

I saw a tweetstorm by a longtime Go user who listed all the flaws and inconsistencies of the language. In the end it didn't look much better than PHP to me. Which is surprising, since PHP is a "grown" language and go has been "designed" by some longtime languages pros.

>and go has been "designed" by some longtime languages pros.

Longtime systems and UNIX pros, not language/compiler pros though. That would be someone like Anders Hejlsberg or Lars Bak respectively.

Re: Why Go and Rust Are Not Competitors (2015)

#65

Earlier quoted context omitted.

This actually makes a lot of sense. From the outside, it's hard to see why anyone uses Go. Using Go feels like going back in time 20+ years. However if someone is coming from PHP, Go must look positively modern. Considering the millions of PHP programmers out there, Go can keep on growing for a long time.

Coming from a scripting language background Go was like moving into the future: concurrency primitives, static linking, channels, fast compile times, awesome standard lib. Not to mention the fact that go fmt makes everyone’s code look exactly the same. No more weird, personal styles being brought into into source code or pointless discussions of naming conventions or indentation.

Concurrency primitives maybe (though languages had those for 20 years too).

But what about static linking, fast compile times and awesome standard lib is like "stepping into the feature"?

Re: Why Go and Rust Are Not Competitors (2015)

#67
post #13
post #5

Earlier quoted context omitted.

They forgot the mindshare of PHP users. The tradeoffs Go makes are rather similar (simplicity, ease of deployment vs expressivenes and consistency).

I saw a tweetstorm by a longtime Go user who listed all the flaws and inconsistencies of the language. In the end it didn't look much better than PHP to me. Which is surprising, since PHP is a "grown" language and go has been "designed" by some longtime languages pros.

Though one thing that Go has which PHP doesn't is the rapidly braking changes (PHP3 and 7 have totally different idioms since early PHP decisions proved to be horribly insecure (register_globals))

Re: Why Go and Rust Are Not Competitors (2015)

#68
post #64
post #13

Earlier quoted context omitted.

I saw a tweetstorm by a longtime Go user who listed all the flaws and inconsistencies of the language. In the end it didn't look much better than PHP to me. Which is surprising, since PHP is a "grown" language and go has been "designed" by some longtime languages pros.

> and go has been "designed" by some longtime languages pros. Longtime systems and UNIX pros, not language/compiler pros though. That would be someone like Anders Hejlsberg or Lars Bak respectively.

Is that why Dart got so popular compared to Go? What about C?

Re: Why Go and Rust Are Not Competitors (2015)

#69
post #19
post #13

Earlier quoted context omitted.

I saw a tweetstorm by a longtime Go user who listed all the flaws and inconsistencies of the language. In the end it didn't look much better than PHP to me. Which is surprising, since PHP is a "grown" language and go has been "designed" by some longtime languages pros.

A lot of complaints usually affect niche or rare use cases in the language (or you learn them fast). Though I guess the same applies to PHP. It's a lot nicer to write webapps in Go though since you have control over global state and not the per-request state of PHP, which makes for some easier solutions to problems (work-queues are easy to implement/use on the server-side unlike in PHP) Also the stricter type system…

I don't think there's anything inherent in the language that prevents PHP from running like Go (daemon that receives requests, rather than being launched by an external server on each request). It's just a matter of convention.

Re: Why Go and Rust Are Not Competitors (2015)

#70

"Rust competes for mindshare with C++ and D for programmers who are prepared to accept more complex syntax and semantics (and presumably higher readability costs) in return for the maximum possible performance. For example, micro controllers, AAA game engines, and web rendering engines. Go competes for mindshare in the post 2006 Internet 2.0 generation of companies who have outgrown languages like Ruby, Python, and N…

I remember reading somewhere that Go was originally intended to take over a lot of projects that are currently C++, and that it was kind of a surprise that more Go programmers ended up coming from languages like Python. If that's right, it might be fair to say Rust and Go were "originally" competitors, even if they aren't as much anymore :)

I mean hell, Rust even had a GC and Green Threads at one point.
Post reply on HN