2 ms·
> No breaks in flow control, it's goto (deprecated) or nothing > Strongly typed, but arrays of different lengths are different types. > Casting types is
by munificent 11y ago
> No breaks in flow control, it's goto (deprecated) or nothing
> Strongly typed, but arrays of different lengths are different types.
> Casting types is not possible
Those are real frustrations, but, at the same time, they help avoid many of the security and safety issues that have plagued C for decades.
It's not clear if there's a language somewhere between Pascal that's less annoying but more safe while still being simple. But I think it is pretty clear that there is a real trade-off in either direction.
C doesn't get in your way when you know you're doing like Pascal does. But it also doesn't get in the way when you don't know what you're doing.
- Avshalom 11y agoWell I mean, there's Pascal, which solves all three of those gripes.
- vessenes 11y agoI think Go has a reasonably good story about each of those three items actually; you can create an array of specific length as a type (and name it if you like), or you can create a slice, which does not have length requirements. Flow control is significantly better, and supports goto style semantics when you need them. Casting is liberally warned against (unsafe.*), but available when needed.