4 ms·
I didn't put Java in the same group as C and C++ regarding safety. I just pointed out that they are all "poorly typed" by which I mean they have rigid, inflexi
by tome 13y ago
I didn't put Java in the same group as C and C++ regarding safety. I just pointed out that they are all "poorly typed" by which I mean they have rigid, inflexible, awkward to use typing.
I agree that Java is safer than C and C++, mostly by virtue of not having pointers. However I would say that Haskell is safer than Java by a far greater degree than the degree that Java is safer than C and C++. You can encode many, many more invariants in types.
As to Haskell being unsafe, of course it is to some degree, since you can't encode, say, termination in the type system. But I'd have to know what specific examples you have in mind before responding further.