@mdhughes You seem to be conflating two things. Having a type system doesnt automatically prevent null references. I mean, some languages may work like that, and that would be great. But to take Java, for example, since it’s he one I know best: checking for null
values is depressingly the norm.
That said, I find the idea of setting a variable without specifying — or maybe even knowing — its type, to be... worrying, let’s say.
@devilgate Well, specifically Eiffel, since that's the linked article. But Swift also bans nulls from normal use (! ? punctuation to do various "wrong" things).
Dynamic objects have a class, but a reference or expression doesn't need to know it, which is what a "type system" is.
@devilgate Java's a little BDSM with Generics, but there are much more dominating and abusive languages now, where it's all but impossible to express free thought and just shove objects in a collection.
@devilgate Or: You tied yourself up so you can only wiggle around enough to put a string in that list, and that's getting you off. And it's dom/sub is when the language designer does it to you. Bjarne has a lotta subs.
@adiabatic I'm a C, not a C++, how does any
resolve method dispatch? Or do you just have a giant if typeof/cast tree after pulling something out? somelist.pop().quack() plus or minus some null checking works in dynamic langs…
@devilgate One of the big improvements in the last decade (2 decades counting Java) are JIT compilers. V8 and Webkit's Nitro run JS faster than many pre-compiled binary languages.
@adiabatic That is truly hideous, just what I'd imagined C++ "dynamics" to look like! I dislike Haskell but it is very pretty handcuffs at least.