4 ms·
> Disregarding all critique of a language as "personal opinion" as long as you can "build cool stuff" with it. GP said it's more valuable to evaluate a program
by mswift42 8y ago
> Disregarding all critique of a language as "personal opinion" as long as you can "build cool stuff" with it.
GP said it's more valuable to evaluate a programming language by the projects people make with it, than by reading the 417th piece of perceived strengths and weaknesses of it. I think GP has a point.
> Go is a GCed language, so you can't really compare it to C++.
That's a very strange thing to say.
- Cyph0n 8y ago> GP said it's more valuable to evaluate a programming language by the projects people make with it, than by reading the 417th piece of perceived strengths and weaknesses of it. I think GP has a point. And I don't, so let's just agree to disagree on that. > That's a very strange thing to say. Does this (or any other) advantage of Go help people who are writing software that cannot have a GC in the loop? No, it does not, so it's really not a valid comparison imo. Could Rust and C++ have better compile times? Maybe. I'll defer judgement to the actual compiler experts though.
- mswift42 8y agoit is my understanding that the bad C++ compilation speed is one of the reasons behind Go's inception. Go has a GC because its creators thought they needed one to support concurrency.
- weberc2 8y ago> Does this (or any other) advantage of Go help people who are writing software that cannot have a GC in the loop? No, it does not, so it's really not a valid comparison imo. This is also a very strange rationale, for several reasons. 1. You can program in Go without a GC 2. There are no applications that prohibit GCs; there are _some_ which prohibit long and/or nondeterministic pause times 3. Even if you were right about 1 and 2, these still wouldn't be reasons for not comparing Go and C++. In particular, your argument is in the form: "You can't compare Go and C++ because {comparison between Go and C++}".
- Cyph0n 8y ago> 1. You can program in Go without a GC But Go was designed to be used with a GC, no? I see the same argument used with D, even though a lot of the stdlib relies on a GC :P > 2. There are no applications that prohibit GCs You are making a very strong statement here. Since we're on HN, I'll give you the benefit of the doubt. I am not a GC expert, so I have a follow-up question: does a deterministic GC exist? If so, what kind of pause time bounds (error/variance) are we talking about? Depending on the answer to this, I could probably list several areas where the bounds are unacceptable. > 3. Even if you were right about 1 and 2, these still wouldn't be reasons for not comparing Go and C++. Of course you can compare the two languages, but my argument is that it's essentially a useless comparison.
- weberc2 8y ago> But Go was designed to be used with a GC, no? I'm not sure this question makes sense. It was designed for easy memory management for the default case by way of GC, but it was also designed to allow users to opt into their own memory management schemes for niche cases. In any case, this seems even less relevant than your original claim. > You are making a very strong statement here. Since we're on HN, I'll give you the benefit of the doubt. It's a strong statement in that it uses absolutes, but it's pretty obvious. "No GC" is not a requirement, it's an implementation decision that assumes GCs are incompatible with the actual requirements (usually something like, 'there may not be unexpected, long pauses' for some values of 'long' and 'unexpected'). In many such cases (for example, game development), Go's low-latency GC is perfectly suitable. In other cases, you can just mind your allocations. > Of course you can compare the two languages, but my argument is that it's essentially a useless comparison. I disagree. To pick a language to use for a new project, you're best served by comparing the candidate languages (as opposed to picking one at random).
- Cyph0n 8y agoIs this[1] what you call "memory management"? > It's a strong statement in that it uses absolutes, but it's pretty obvious. Two can play at that game. You are completely wrong. If your best example of an environment where a GC might not be a good fit is game development, then you are in no position to use such absolute statements. Personally, I tend to add "I think" or "I believe" whenever I am making statements that are outside of my realm of expertise. This prevents me from making a fool of myself ;) > In other cases, you can just mind your allocations. Good luck getting Go to run efficiently on a microcontroller without a ton of weird hacks. Whether you like it or not, there are areas where Go will simply never be able to compete with proper systems languages like C or C++. This is by design: Go simply has different goals. > as opposed to picking one at random ? [1] https://stackoverflow.com/questions/19848413/can-you-deallocate-memory-with-go-garbage-collection-disabled https://stackoverflow.com/questions/19848413/can-you-dealloc...