OdeToCode IC Logo

Language Quiz

Tuesday, September 27, 2005

What language is the following code snippet using?

var person = new


    Name = "Steve",

    JobTitle = "National Assurance Orchestrator"


A) JavaScript
B) C# 3.0
C) COBOL.NET with WinFS extensions.
D) None of the above

For hints, see Steve Maine’s excellent post “On JSON” (JavaScript Object Notation), and Abhinaba’s informative rant “C# 3.0: I do not like Anonymous types”.

Andy Tuesday, September 27, 2005
Awwww isn't that cute C# is getting Lambda syntax now. Gee didn't Lisp have that like 60 years ago? And it didn't even need the new qualifier.

Seriously though it's a bad idea it makes for super hard to debug and maintain code. Ask anyone who has ever had to maintain or debug legacy Lisp code. They really need to solidify C# and stop trying to be everything to everyone before the language ends up more bloated than Java. Giving people this is very similar to giving them a Variant data type and we all know what a nightmare the VB6 morons turned that into. Just wait until those same folks get a hold of the ability to have lambda types and it will make Variant look like it was a good idea.
scott Tuesday, September 27, 2005
I think the syntax will be in place more for tool support and stuff happening under the covers (at least for the anonymous type feature). Hard to tell where it will all end up at this point, though.
Comments are closed.