Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Lack of operator overloading limits the audience of a language to non-numerical applications (e.g. no gamedev).


Limit the audience for end user applications, possibly.

If this were generally true then C wouldn't be used in numerical applications which is clearly not the case.

I think this is the wrong way to look at it. Where C still has advantages over many languages is where the developer's primary mental model is the machine the program is running on. That's why it's used for device drivers and low level library work.

Over the last couple of decades, C has become less and less good at this task as the C model and the machine have steadily diverged. At the same time, it's limitations have been exposed more and more.

In my view, Zig is aiming at this space i.e. where the developer is primarily interested in what the machine is doing. What they have done is kept the C model (largely) but mitigated or removed some of the egregious failings of C.

Zig may not be unique in doing this but it's definitely quite rare. Rust, Go, Swift et al aren't attempting to do this. This isn't a criticism just a perfectly legitimate difference of priority.

As I failed my soothsaying exam, I'm in no position to predict which, if any, will succeed. I hope (without much justification) that having language diversity will encourage natural selection.



In that video he just said that operator overloading was good for math operations. That's not a counter example.


even for math operations, "we'll let it go" would seem to be a different sentiment than "good". :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: