RSS 2.0
 Monday, October 27, 2008
Just been to Anders Hejlsberg’s talk on the future of C#, where he outlined what’s coming in C# 4.0 and (some) of what might come in C# 5.0.

Importantly: C# 4.0 focuses on Dynamic Languages (i.e. the Dynamic Language Runtime (DLR))  and concurrent programming (i.e. programming for multi-core CPUs).

New in C# 4.0 is support for the attic type dynamic.
This allows you to specify a type which isn’t known until runtime.

Under the hood, it all seems to use the whole Type Invoke mechanism (i.e. reflection, which can be very slooooooow).
Which leads me to wonder: dynamics in C# 4.0 look like they’re cool in certain situations, but you end up with perf-problems, and the possibility for difficult-to-find runtime bugs.

For example, if I typed:
dynamic calc = GetCalculator();
int val = calc.App(2, 10);

Instead of

int val = calc.Add(2, 10);
well.. I won’t know that there is a  bug until I get to that line as it’s dynamically executed
At least, that’s my understanding.
It’ll be interesting to see how they address this.

In C# 5.0, Anders showed how they’re re-writing the C# compiler (csc) in managed code – and allowing you to interact with it from code.
Specifically, he showed how to dynamically generate, compile and execute code.. similar to what CodeDOM does today, but much much cooler.


Monday, October 27, 2008 10:47:56 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
PDC2008
Comments are closed.
Navigation
Archive
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010
Daniel Probert
Sign In
Statistics
Total Posts: 36
This Year: 0
This Month: 0
This Week: 0
Comments: 13
Themes
Pick a theme:
All Content © 2010, Daniel Probert
DasBlog theme 'Business' created by Christoph De Baene (delarou)