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
Navigation
Archive
<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
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 2012
Daniel Probert
Sign In
Statistics
Total Posts: 44
This Year: 0
This Month: 0
This Week: 0
Comments: 26
Themes
Pick a theme:
All Content © 2012, Daniel Probert
DasBlog theme 'Business' created by Christoph De Baene (delarou)