News for hackers. Stuff that matters.
Re:An analysis of the C#/.NET platform by rbanffy on Saturday November 02, 2013 @06:59PM (#6661228)
> C# 4 added serious dynamic typing, so that you can make ruby/pthon/js-style dynamic objects;

So you can match the so-so performance of dynamic languages (which is debatable, BTW) with C#'s horrid (when compared to Python or Ruby, at least) syntax.

I fail to see the advantages here. If I'm doing something that demands dynamic types, I do it in Python. If I need static-types, I do it in C, C++, Objective-C, Go, Java- whatever better fits the problem.

Re:An analysis of the C#/.NET platform by jpalomaki on Sunday November 03, 2013 @06:52AM (#6662886)
The purpose of dynamic is not to turn C# into a dynamic language. It was added to make it easier to interface with certain other parties. Sometimes you just don't have the type information (practical example is handling JSON data) and dynamic can make the code cleaner in these cases.

More about this: http://msdn.microsoft.com/en-us/magazine/gg598922.aspx

Re:An analysis of the C#/.NET platform by pdwetz on Saturday November 02, 2013 @07:49PM (#6661386)
Dynamic typing support helps in a pinch in C#, as you can avoid a lot of code in some cases where performance isn't paramount. I've personally used that in a few cases in the past.
Re:An analysis of the C#/.NET platform by NicoJuicy on Sunday November 03, 2013 @06:10AM (#6662810)
Develop in Asp.Net MVC and change your viewmodels to dynamic (ExpandoObject) types.

You'll notice the advantages :)

ps. want to iterate over the object like in reflection, just convert the object to a (IDictionairy<string,object>)

Re:An analysis of the C#/.NET platform by bryan_rasmussen on Saturday November 02, 2013 @08:05PM (#6661445)
What problems are there that you would consider choosing a statically typed language for them, because of the typing?
Re:An analysis of the C#/.NET platform by rbanffy on Saturday November 02, 2013 @08:40PM (#6661555)
Static typing helps generating very concise and fast native code. I'd go with C or C++ when speed and or very precise control are absolute requirements. It also doesn't hurt you when you have a clearly defined problem that will never change - when you know you'll never receive a float instead of a 64-bit integer.

But there are other reasons to pick static typing. Using Java is natural for writing Android apps, Go has a very natural syntax for expressing concurrency and C# is the best choice when you want to write a Windows app. A programmer should always pick the language that better fits the problem it has to solve.