top | item 16398383

(no title)

camus2 | 8 years ago

> It's everything C can do, but much better.

No, go has a garbage collector. It is not a replacement for C. Languages like C++, Rust or Ada are.

discuss

order

peterevans|8 years ago

Like I said: Go does everything C does, but better.

I suppose you could write your own malloc in Go... if you preallocated a bunch of bytes in a huge chunk, and wrote some functions to use that up. But that sounds like a pain.

If you really really specifically need to manage your own memory, then I agree, you shouldn't use Go. But that doesn't mean that Go is not a valid replacement for C. Do you think a majority of programs that are written in C are done so because they need to manage their own memory?

camus2|8 years ago

> Like I said: Go does everything C does, but better.

It doesn't do everything C does, it doesn't allow manual memory management at first place.

So you can't pretend that a garbage collected language does everything a language with manual memory management does.

Manual memory management is a feature, Go does not have such a feature. Deterministic behavior in a program is fundamental when writing hardware drivers or real time programming, Go can't do that.

pjmlp|8 years ago

As already proven by many attempts to implement safe OS, a GC is not an impediment in a systems language, religion and disbelief against GC are.

Joe Duffy has putted it quite nicely regarding how many in the Windows team saw Midori, even though it was proven to be running right in front of their eyes.

RustConf 2017 - Closing Keynote: Safe Systems Software and the Future of Computing by Joe Duffy

-- https://www.youtube.com/watch?v=EVm938gMWl0

camus2|8 years ago

> a GC is not an impediment in a systems language,

You'd have to define what you mean by system language at first place before making such a claim.