5 ms·
I just use Go (golang) instead, whenever I can Go can be understood as an improved C that keeps much of C's simplicity but adds small, powerful features like i
by 37ef_ced3 6y ago
I just use Go (golang) instead, whenever I can
Go can be understood as an improved C that keeps much of C's simplicity but adds small, powerful features like interfaces and channels and garbage collection
Go fixes C's well-understood flaws (declaration resembling use, unintuitive operator precedence, unrestricted address math, silent casting, zero-terminated strings, etc.)
Go puts essential C idioms directly into the language (pointer/length is formalized as slices, packages are part of the language instead of just being naming convention, etc.)
The longer I used C++, the more I despised it. I used C++ for 11 years and I literally hate the language. But C has always remained a pleasure, and Go is a continuation/modernization/enhancement of that
Go is mature, stable, widely-used, well-supported, well-understood, etc., so it's fully mainstream
If you like C, you will love Go
- Rendello 6y agoDo you have any thoughts on Zig? It's nowhere near stable yet, but it seems like the a promising C replacement, in terms of maintaining simplicity, strict memory control, etc. (speaking as someone who's only worked a few months in C, as a hobby)
- shrimp_emoji 6y agoYou misspelled Rust several times in your post here.
- 37ef_ced3 6y agoRust is too complex. It's not simple like C
- pansa2 6y agoI’ve heard that Go code can make use of libraries written in C++, but that you can’t write libraries in Go and use them from C++. Is that true? If so, it’s a significant impediment to introducing Go into a team that’s currently using C++ - any Go code would be isolated from the rest of the codebase.
- srockets 6y agoLike the OP approved subset of C++, the design of Go is anachronistic on purpose, and makes a point to ignore most of what we have learned about programming language design since the 1990s. Go goes further and puts the blame on its users, who are “not capable of understanding a brilliant language […] the language that we give them has to be easy for them to understand and easy to adopt”[0]. This stands in a stark contrast to one of C++'s design principles, namely that the language shouldn't “force people to use a specific programming style”[1]. C++ not being opinionated is not aesthetically pleasing, and at times confusing. But that wide acceptance to new ideas is exactly what allowed those ideas to graduate from niche languages to the mainstream. -- [0] Rob Pike at Lang.NEXT 2014. 20:52 @ https://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/From-Parallel-to-Concurrent https://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/Fr... [1] Bjarne Stroustrup, pp.3 @ https://stroustrup.com/hopl-almost-final.pdf https://stroustrup.com/hopl-almost-final.pdf
- 37ef_ced3 6y agoGo and C (even moreso) are simple languages. Some people understand the reason for (and appreciate) that simplicity Other people prefer profound language complexity; no comment
- srockets 6y agoI don't think the motivation behind Go's and C's austerity is the same for both language, so I wouldn't lump them together in the same argument.
- 37ef_ced3 6y agoGo's austerity is an acknowledgement that C's austerity is a net win (as long as you fix some of C's well-understood deficiencies; e.g., you're better off with slices and maps built directly into the language)
- erik_seaberg 6y agoWhen a language ignores a problem in the name of simplicity, every application now needs to choose some idiosyncratic way to solve the same problem without help. Mastering a larger toolbox takes work but it pays off.
- elb2020 6y agoI see you've revised your comment from 3 days ago, where you made the more sweeping statement that "the longer you use C++, the more you despise it". My experience is that C++ is complex, but it gives you power. I think whether or not you like the complexity of C++ depends very much upon whether or not you _need_ the power that comes with it. If you do not need the power, I can understand your argument that a simpler language is preferable.
- devnull1 6y agoagree with you completely