mdhughes
mdhughes
Bring Out the Type System mdhughes.tech
|
Embed
devilgate
devilgate

@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.

|
Embed
mdhughes
mdhughes

@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.

|
Embed
mdhughes
mdhughes

@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.

|
Embed
In reply to
devilgate
devilgate

@mdhughes The thing with BDSM, though, is that there’s always someone dominating and someone submitting. I don’t see myself being dominated by generics: I’m using them to enforce my will. This Collection can only have Strings in it, or it’s going to be inserious trouble.

|
Embed
mdhughes
mdhughes

@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.

|
Embed
mdhughes
mdhughes

@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…

|
Embed
devilgate
devilgate

@mdhughes Fair enough. I still prefer to specify the type, I think.

Now, don’t get me started on the lack of a compiler in scripting languages. I think that’s a blog post I’ll soon be writing.

|
Embed
mdhughes
mdhughes

@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.

|
Embed
devilgate
devilgate

@mdhughes Sure. I've been using some R lately, and it's so frustrating that you have to deploy and run a test just to find a syntax error. IDEs should help, but R doesn't seem to have great support.

|
Embed
mdhughes
mdhughes

@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.

|
Embed