|
|
|
|
|
by ivraatiems
1464 days ago
|
|
Am I wrong/naïve in thinking that a number of things mentioned here (no null pointer references, better bounds checking, immutability, pure functions by default) would be relatively easy to implement at least simple versions of in a language that compiles to C? For example, the null pointer reference the author demonstrates would not be at all difficult to identify at compile time, it's literally just checking whether any structs are created with pointer properties initialized to 0. Checking for null pointers in all circumstances is much harder, but this particular example is easy. Why claim V supports this when it doesn't? Am I missing something about how hard it'd be to implement? |
|
Pure functions are the hardest of the ones you've identified -- they're nominally easy if you have perfect purity information, but pretty difficult (impossible, in the general case) if you don't or if your definition of "pure" is just plain incorrect (like V's is).