News for hackers. Stuff that matters.
Re:Why Go and Rust are not competitors by coldtea on Thursday July 02, 2015 @08:33AM (#9818388)
>Rust and Go are both touted as memory safe. While this statement is absolutely true, both languages will not tolerate unsafe memory access, what is more important is that the world will not tolerate any new language which is not memory safe. It just so happens that Go and Rust are the first two languages to emerge after decades of evidence that in the real world, programmers as a whole, cannot safely manage memory manually.

This is extremely misleading.

Go and Rust are not at all "memory safe" in the same way.

And Go and Rust the "first two languages" in this regard? Hardly.

Rust maybe, because it uses a novel approach, but there's absolutely nothing special in Go's "memory safety" approach compared to Java (and Scala, Clojure), C#, D, Haskell, etc.

Re:Why Go and Rust are not competitors by infogulch on Thursday July 02, 2015 @10:42AM (#9819179)
You took it the wrong way. Dave didn't say that Go's GC was special, of course garbage collectors have been around for decades. The key takeaway:

> what is more important is that the world will not tolerate any new language which is not memory safe.

Because of that, both Go and Rust, as a new languages, are not memory unsafe. Go's safety is boring, sure, but it's still a feature of the language.

So both languages are memory safe in that they are not memory unsafe, big whoop. That's Dave's point. All new languages have this, and even though they're commonly compared with this metric, the metric itself is useless for new languages.

Re:Why Go and Rust are not competitors by gyre007 on Thursday July 02, 2015 @11:02AM (#9819331)
>Rust and Go are both touted as memory safe. While this statement is absolutely true

Duh?

>So both languages are memory safe in that they are not memory unsafe

This is more accurate statement imo. Saying Go is memory safe [1] is like saying a lamb is safe among a heard of hungry lions.

[1] http://www.pl-enthusiast.net/2014/07/21/memory-safety/

Re:Why Go and Rust are not competitors by infogulch on Thursday July 02, 2015 @11:24AM (#9819494)
From that article, safe Go prevents: buffer overflow, use after free, use of uninitialized memory, illegal free, access to undefined memory. The only thing it misses is null pointer dereference. (OOM errors are not possible to prevent in turing-complete languages.)

I don't agree with your analogy. A lamb among lions is clearly very unsafe, but Go isn't unsafe; you just agreed with me on this. Your analogy fits better to C/C++. The lamb could theoretically survive, but it's very unlikely; just as unlikely as a C/C++ program with no memory bugs.

Re:Why Go and Rust are not competitors by gyre007 on Saturday July 04, 2015 @08:25AM (#9829954)
Yes I do generally agree with you. I went a bit overboard - somewhat HN pushes me over the edge sometimes :-(

Lamb metaphore would not do Go the justice indeed. I do like Go, but also do not like some opinion which oversimplify reality.

Re:Why Go and Rust are not competitors by coldtea on Thursday July 02, 2015 @04:08PM (#9821292)
Again, how are those "the first" after people stopped tolerating new unsafe languages?

We hadn't had a new memory unsafe language catching on (or released from some major vendor) since what? C++? It was pretty much standard by the time Java was out. Heck, there were mainstream Smalltalk in the 90s, with IBM support, IDE's et al.

So Smalltalk, Java, VB (up to 6), C# and others all all languages that predated Go and Rust in memory safety, and came out in an era memory safety was de rigeur.

Re:Why Go and Rust are not competitors by pjmlp on Friday July 03, 2015 @04:08AM (#9824226)
Just adding Ada, Modula-2, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Turbo Pascal, Quick Pascal, Delphi, Eiffel, ... to your safety list.

It is incredible how two decades of C and C++ becoming mainstream, change the perception of all existing alternatives.

Re:Why Go and Rust are not competitors by tedunangst on Thursday July 02, 2015 @10:50AM (#9819229)
Go and Rust are the first two to emerge after decades of evidence. Other languages emerged during those decades. :)
Re:Why Go and Rust are not competitors by qznc on Thursday July 02, 2015 @09:39AM (#9818734)
It was Java which took non-manual memory management to the mainstream. Lisp takes credit for inventing garbage collection.
Re:Why Go and Rust are not competitors by pjmlp on Friday July 03, 2015 @04:14AM (#9824246)
Basic dialects and Clipper, just to cite two examples with reference counting.

Smalltalk was also becoming mainstream before Java entered into the picture.

Re:Why Go and Rust are not competitors by yummyfajitas on Thursday July 02, 2015 @10:31AM (#9819111)
Visual Basic was pretty mainstream before Java. As I recall, it had something along the lines of reference counting for memory management.