5 ms·
I generally think that C is the right level of abstraction and provides the right model for thinking about programming. However, I don't actually use C because
by fasterik 3y ago
I generally think that C is the right level of abstraction and provides the right model for thinking about programming. However, I don't actually use C because I can work at the same level in other programming languages.
Right now, C++ is my language of choice, but I'm far from happy with it, for obvious reasons. I think my ideal language would be as close to C as possible while adding some quality of life modifications. Off the top of my head, those would include: namespaces, modules, generics, removal of the -> operator, and removal of forward declarations (which would imply order-independent declarations).
Of course, it's easy to imagine such a language, but hard to implement it and be successful in practice. Most attempts probably never get out of the hobby project phase. Those that achieve some success will feel pressure to continue to add features to differentiate themselves from the competition. Maybe I am in too small a niche and there simply isn't a market for what I would like to use.
- kevin_thibedeau 3y agoC23 technically has namespaces for the attribute syntax. Hopefully it will be extended into the main syntax in the future. It's also easy to implement basic generics using either _Generic() or m4 macros.
- steveklabnik 3y agoYou may enjoy Hare.
- c-cube 3y agoNo generics... Zig seems like a better fit.
- fasterik 3y agoI had a bad first impression when the Zig compiler refused to compile a file with Windows line endings. For all I know it might be an interesting language, but to me that decision indicates a level of pedantry and hostility to non-Linux environments that doesn't look too promising.
- steveklabnik 3y agoAh, I didn’t know you were a fellow Windows user, you will find hare more offensive in this respect, the official compiler does not and will never support Windows. In theory someone could write one but I doubt it will happen.
- fasterik 3y agoThat's unfortunate. I'm not a defender of Windows or Microsoft; I think they're terrible. But if you want to make video games or any other software primarily for desktop computers, Windows needs to be a first class citizen.
- fasterik 3y agoI had not heard of Hare. It does look promising. Thanks for the recommendation.