|
|
|
|
|
by rapsey
964 days ago
|
|
> Please, do explain: what does "much less expressive" mean, in technical terms? What specific data modeling can I not do in Go, and what specific bugs can be caused by that? > Yes, so? De-Referencing a null pointer in Go crashes the program, making the bug very obvious. At runtime. i.e. production. You think that is just as good as solving the problem at compile time? I certainly don't. |
|
At runtime, i.e. initial testing, pre-commit-checks, integration-testing, QA and then production, yes.
So there are a lot of checkpoints where the system can crash before it ever goes live.
> You think that is just as good as solving the problem at compile time?
No, I don't, and I never wrote that I do.
I do think that it's a lot better than not crashing and running inti undefined behavior when dereferencing a null pointer, which is a problem in older languages, and a source of hard to track bugs.
The problem is: solving it at compile time isn't zero-cost.
Languages that pretend that void pointers don't exist are usually more complex than languages that accept their existence as a fact of the underlying hardware. That extra complexity comes at a tangible cost in development time and maintainability. A language that fails early, and with a clear signal, will sometimes crash in testing, and maybe maybe maybe in production here and there, and such crashes may incur a cost. A more complex language will always incur a higher cost in developer time.