3 ms·
Old-style Java "double" type declarations suck. Stuff like this: BigNastyGenericThing<string,FooMonstrosityFactory<Tuple<int,string,double>>> _nastyFoobarOb
by douche 11y ago
Old-style Java "double" type declarations suck. Stuff like this:
BigNastyGenericThing<string,FooMonstrosityFactory<Tuple<int,string,double>>> _nastyFoobarObject = new BigNastyGenericThing<string,FooMonstrosityFactory<Tuple<int,string,double>>>();
That can die in a fire, for all kinds of reasons. I'm a huge fan of C#'s var keyword inference sugar, because it cuts the amount of type annotations in half. It also makes it a lot easier to mess around and iterate - there's less irrelevant syntax trash that's broken if you deliberately change the return type of a function or expression.
At least with a statically typed language, I can find all the things that I have to find if I break an interface - I have good tooling that uses the type system and can do semantic analysis and even track down when I'm hitting methods and properties through reflection. On dynamically-typed code, I have to grep the whole source-base, and filter out all the false positives.
I blame Javascript. If I could run C# in the browser and have real interfaces that understood the same assumptions instead of the hodge-podge of stringified data-binding and parsing...