5 ms·
How does that make the language half-baked? Go didn't have generics until recently which made utility functions like that complicated. C doesn't have them eithe
by vultour 4y ago
How does that make the language half-baked? Go didn't have generics until recently which made utility functions like that complicated. C doesn't have them either.
- albinofrenchy 4y agoI write mainly in c and like most aspects of it but its the absolute minimum standard for built in library support. The fact that simple reusable utility functions were/are complicated does make it feel half baked to me too.
- Thorentis 4y agoC was created 40 years ago. I wouldn't expect it to have the same feature set as Go. Plus, we already have a language like C, and it's called C. Go made multiple decisions that make me face palm. It was so close to being a great systems programming alternative.
- systemvoltage 4y agoI want a programming language that’s boring. It should have things that Python has including classes. Fast and compiled. No need to try new things. A pythonic C++ that doesn’t smell bad. I wish Go had classes. I like those damn things. Extending a Dog from Animal with all the methods and data in one place is nice.
- francoispon 4y agocan't you get away with just composing the structs, sure not exactly the same but does a good job still
- kortex 4y ago> A pythonic C++ that doesn’t smell bad. Obligatory...try Rust? But actually, try python with mypy and mypyc. It's still a little experimental, but if you stick to simple constructs it works well, and you can compile straight python to fast, static libraries, without using goofy cython syntax.
- bostik 4y agoIf by extending you mean that you want to have a type that includes ALL the functionality of another type, without needing to fill in each method, that's already supported. In your new struct definition, include the desired base type as a member - without giving it a name. That embeds the unnamed member directly, and your new type automatically gets all the interfaces and their underlying implementations. As a python-person I always found this a somewhat odd mechanism, but from a functionality perspective it satisfies what I have wanted to do. Guess that's what people mean by composability.
- chakkepolja 4y agoI think you can reasonably represent inheritance using struct embedding, and that's quite idiomatic in Go.
- gunapologist99 4y agoYou should check out Nim. I wish more people would! https://nim-lang.org/ https://nim-lang.org/
- bigbillheck 4y ago> C was created 40 years ago. Closer to 50.