News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood by MichaelGG on Friday May 09, 2014 @04:41PM (#7723152)
>You can't implicitly type the members of an object or the arguments of a function

That was due more to architectural issues in the C# compiler than any principled reason. C#'s type inference is extremely weak and incomplete and is a poor example of "getting it right".

Re:Why Python is Slow: Looking Under the Hood by Aaronontheweb on Friday May 09, 2014 @05:26PM (#7723333)
I'm failing to imagine a scenario where implicitly typing either of these would benefit me as the developer - having those elements remain statically typed seems like "the right thing to do" given their role in defining public code contracts. Could you help me understand why this is a bad thing?
Re:Why Python is Slow: Looking Under the Hood by MichaelGG on Friday May 09, 2014 @07:43PM (#7723881)
They are always statically typed; no one is talking about dynamic typing. Inferred types are just as static as any others.

Example: Dictionary<string, Func<string, int, Dictionary<string, string>>> somedic = new Dictionary<string, Func<string, int, Dictionary<string, string>>> { ... }

Is almost entirely better served by

  let somedic = dict [ ... ]
Your point about defining a public interface is separate. If you have a specific API that you cannot break, then feel free to type it out all you want. If you feel a piece of code is confusing or unclear without an annotation, go ahead and add it.

For the majority of code, having to specify the types is an exercise in verbosity, nothing more. Unless you're only writing public libraries with no internal implementation, I don't see how there's not a scenario.

Re:Why Python is Slow: Looking Under the Hood by Aaronontheweb on Saturday May 10, 2014 @02:36PM (#7726428)
I agree that doing that type of inference would be convenient - I deal with a lot of nested generics like that on daily basis.

But this is just syntactic sugar, and the var keyword already takes care of the left-hand operand in this equation. Generic functions also do a reasonably good job of type inference under this set of circumstances, although I've found that generic delegates and lambdas not so much.