Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
p100sch15005yBecause it goes against the usual strict rules of strongly typed languages. It is only natural that this happens.
-
var is still strongly typed as it has to be assigned at initialization and cannot be a return type. It makes LINQ so much easier to use.
-
Because you knew the type beforehand? I used dynamic a couple of weeks ago and lived to tell the tale. If I'm being honest with you I think that Object would have done the trick... but it felt so right.
-
I sigh whenever I see Java code go a similar way. It makes it so hard to see what type is meant to be where, and introduces the potential for all kinds of bugs. Can't stand it.
-
It depends on your use case. It might be very well a good choice. But use it only if really really needed, never use it for convenience.
Related Rants
Just used the dynamic type in c#. Why does it feel so bad?
random
dynamic
c#