« Advanced Linq - Dynamic Linq query library: Add support for 'Contains' extension | Main | WCF, DataContract serialization and self-tracking entities - Internals and tips »

27/05/2010

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Bill

I noticed a couple of common misconceptions in this post. First, dynamic languages (including 'dynamic' in C#) are typically safer than static languages precisely because all operations are confirmed and yield meaningful language-level error messages (as opposed to segv or some machine/OS level error). Of course, with the new breed of static languages such as Java and C#, you do get safer code often with good error messages. Second, there was the suggestion that dynamic languages (and C#'s 'dynamic') is unsafe due to a lack of strong typing. Again, dynamic languages are often more strongly typed that static languages, and therefore safer.

There is nothing about C#'s 'dynamic' that is unsafe or weakly typed; it is simply not statically typed at compile-time.

Cheers,
Bill

Walter Almeida

Hello Bill,

Thanks for your comments. You make a good point and I agree with you that dynamic langages are type safe and strongly-typed since type checking is done, and done at runtime.

When I say that C# without dynamic extensions produces more robust code than using dynamic extensions, I mean it because you have the extra compilation time checking that tells you immediately if you did something wrong. With dynamic extensions you have to wait exectution time to have some feedback. Or: you have to produce enough unit test code to properly early report errors.

In short, I don't want to say statically typed languages and better or worth than dyanmically typed langages. I am just saying that C# is a statically typed langage, thus using the dynamic keyword should be limited to very specific scenarios. My intent was to describe one of this scenarios.

Cheers,

Ruby on Rails

I will look forward your opinion about ruby on rails. Another language that used object oriented priciple

The comments to this entry are closed.

My Other Accounts

Links

Twitter Updates

    follow me on Twitter