Anders Hejlsberg Video on C# Dynamic


In this Channel 9 video C# architect Anders Hejlsberg answers some commonly asked questions about the new Dynamic features that will be included in C# 4.0. Building on the talk that he gave at PDC,  Anders chats with C# Community PM Charlie Calvert. They discuss questions that community members have asked and riff on themes of import to developers who have been following the latest news from the C# team.

 

Entry Media

 

kick it on DotNetKicks.com

Comments (43)

  1. You’ve been kicked (a good thing) – Trackback from DotNetKicks.com

  2. Peter says:

    I am new to programming. I have started programming with c# 3.0 with .Net Framework 3.5. I am discouraged by the fact that a new version of c# and .Net Framework is already coming out. I am not sure if I should keep on studying the current version of the language and .Net Framework or wait until teh new versions are released.

    Please Advise.

    Thank you.

    Best Regards.

  3. J. Sexton says:

    I wouldn’t worry about it too much Peter. Just learning the core parts of the language (control statements, manipulating primitive types, inheritance, File I/O, passing data with constructors – delegates – properties – objects, etc…) is a great place to start. After you have mastered these initial steps, moving upwards towards any language will be easier. I think you made a great choice by choosing C#.

  4. Steve strong says:

    i love all the new features in c#, and I have been programming for 30 years, c, c++, list, VB. and now c# is one I like best.  One thing that is missing is a macro language, a way to simplify code that gets type over and over.  iDymanic goes a way to simplify that.  Any thoughts on adding an simple marco language to dynamically generate common code?

  5. Steve strong says:

    i love all the new features in c#, and I have been programming for 30 years, c, c++, list, VB. and now c# is one I like best.  One thing that is missing is a macro language, a way to simplify code that gets type over and over.  iDymanic goes a way to simplify that.  Any thoughts on adding an simple marco language to dynamically generate common code?

  6. Hamid says:

    Hello I am a C# programmer I am a Question From you

    Why Solution of C# about Write Boot And lowest Program is low

    I am a programmer that I want write all program with C# But I can’t , Because I cant write a .net program with C# without API that do Lowest work

    for example I can’t write a boot that dont work in windows

  7. Abhijeet P says:

    Hi,

    Can you provide a WMV download link?

    Thanks.

  8. Mark says:

    Steve,

    Try looking into code snippets.

    They go a great way in helping you recycle code…

  9. Bishoy Ghaly says:

    Where are you taking us andres with all these new features and releases ?

    I think we (the developers) need a break to learn all of that and apply it and oversee our next steps.

    this is too much evolution for a programming language over the past 3 years.

  10. Antonio says:

    Uh, finally, i loooove the new goodies, i wish i had these when i was writing my .net wrappers for office automation. Also the compiler as a service is soo cool. Kudos!

  11. alex says:

    I think is too much for a language and many developers will gave up with c# like i will certainly do. In 3 years you changed the language at least 3 times. It’s not normal. I think that if you want more C# developers you should stop making changes to language. otherwise you will loose many programmers…

    Cheers,

    Alex

  12. Anders,

    First let me say that I’m a huge fan of yours.  I came to C# about 10 years ago from the Java / Unix world and since then I’ve never been happier!  

    I’ve really been impressed with the thought and creativity that has gone into the .NET framework.  The latest version of the Framework is completely awesome!  I love LINQ and I’m especially looking forward to the improvements that are coming in the 4.0 release. (The System.AddIn namespace is also a great addition to the language).

    Keep up the good work and thanks for helping to create such an awesome product!  

    All the best,

    -Joe

  13. etropic says:

    those of you mentioning the laguage "changes" and not keeping up are taking this out of context.

    First, for the new programmers starting with 3.0. If you are overwhelmed by the new changes you are in for a world of hurt. If this is a hobby, no biggie. If this is a chosen career.. be prepared to always be a step behind the curve…

    For those that think changes (addittions) are not normal, I suggest you look at other language specifications. Languages change, morph, items are added, removed etc. it happens to all of them. The ones that are not changing are old laguages that have already gone through decades of change. This is something that will continue forever.

  14. SWeko says:

    I’ve been a fan of Anders for 15+ years (Turbo Pascal, Delphi, now C#)and i’m always amazed at the level of excelence i’ve come to expect (and get delivered too).

    LINQ was a revolution and a reveletion for data-driven developement, and also inclusion of traditional functional programming into C#. I’m glad that the trend for looking outside the traditional boundaries continues with dynamic features.

    And for the new programmers starting out on c#, it’s just great that with C#, the new does not break the old, and if you don’t wanna use some uber-new feature, you don’t have to.

  15. ödev says:

    I agree with my friend.. Just give us a little time to catch up all of these new features..Why you are in such a hurry like that 🙂 please slow down let us catch you guys..

    Anyway, nice video.. Thanx

  16. Richard Hein says:

    To all of you people complaining about the language changing to fast … you have to understand why.  The dynamic features of the language will make it easier to use C# 3.0 features that you are having trouble learning or leveraging fully now.

    For example, how do you pass anonymous types around to other methods?  How do you do two-way databinding from some entities merged together into an anonymous type and bound to a grid?  These are a couple of things that will be more easily addressed with the C# 4.0 features.

    There’s at least a couple of years before C# 4.0 comes out, so just get up to speed on the existing language features before you judge what’s coming in 4.0.

  17. Khaled Waheed says:

    Richard, 2 years brfore C# 4.0?!! are you sure of that?. I haven’t fully explored the new features of 4.0 yet . but I totaly agree with you and Andi, you can never stop to catch your breath in this industry. a real geek nvr stops learning. f u can’t catch up, find a cozy librarian job!!

  18. Bhavesh Dave says:

    Dear Sir

    Is there any guidence avalible for learners of C#, Visual studio.net 2008 and dot net framework 3.5, regarding from where any on start and which books are for begginers and which are for intermediate learners and which are for expert. Is there any path?

    I wish to appear in MCTS EXAM – 70-536

    bhaveshdave@ymail.com

  19. marksammi says:

    From the explanation given, is it fair to say that Dynamic is analagous to Late Binding vs Early Binding?

  20. tont says:

    I can see where marksammi is.

    It would be good to see what the differentiator is.

  21. Mats says:

    does the new stuff

     1. makes the applications faster (probably not)

     2. solve any new problems (nope)

     3. simplifies things (no)

  22. Hamed says:

    hi , I am Iranian programmer and I have many problem with catch new microsoft’s products and lerning new feature .

    Are you think  I need C# 4.0 and new features and it help me in my work ?

  23. Mike C says:

    Developers (at least Microsoft developers) are put at a distinct disadavantage compared to other trades/professions because they never have a chance to get truly proficeint with any one toolset. Thats why new technologies and features no matter how cool and clever are greeted with ambivalence. When technolgy changes to quickly, the potential productivity gains are mostly offset by the learning curve. I dont speak for the true geeks, just the everyday developer who has real world deadlines to meet.If Microsft was truly concerned about empowering their target audience, they would focus more on producing tools which encouraged good application design based on best practices rather than endless barrage new ways to accomplish basically the same thing.

  24. Oliver says:

    Many o fthose new features have been in Adobe ActionScript 3.0 for the past years. Such as dynamic objects; it’s imply a given in Adobe Flex and Air development. But hey: Gotta love Microsoft for moving along with the rest of us. 🙂

  25. the dude says:

    It is interesting to see so many posts commenting on the tumult of changes in C#.  I’ve had this conversation a few times with my peers.  Most of us despise changes that bring no new funcitonality or spped, but are just a new way of doing the same thing.  It seems a waste, and it needlessly divides the programmers community.  

    I’ve been programming for 30 years – since I was 14.  I love prohgramming, and I love learning new API’s and platforms.  But I am also practical, and I realize I am programming for a reason – to provide solutions to business problems.  I can’t do that when the technology is constantly changing.  

    Sure, I realize languages evolve, in order to adapt new needs, such as accomodating XML or HTTP.  But to continuously revamp the API just so you can say "gee, look at this new way" is unproductive.  One of my old Vice Presidents used to say people doing that were "spinning their propellers", speaking of the propeller beanie caps, and somehow evoking the image of someone lost in their own world.

    I mean – should I spend significant time learning WPF?  or XAML?  Or Silverlight?  Which one will still be around next year?  Which one will be replaced by Anders’ next fart?  How do I protect my resume?  

    I don’t care how great of a geek you think you are, there is no way you can be proficient in a language and platform that is as large as C#.Net.

    I agree that Microsoft needs to be more selective with their advances.  Stop trying to impress everyone with how rapidly you can resurface the API.  

    I notice the VB.Net team has surpassed the C# team in producing IDE funcitonality that makes the programmer more productive.  If the C# team wasn’t wrapped up in reinventing everything, maybe they’d have intellisense for XML and the many other feature with which the VB.Net team has leapfrogged them.

    Having said all that, I love C#, it blows away Java.  I spent 6 years coding Java/J2EE, EJB’s and all that.  

  26. Mike says:

    For all of those of out there who are whining about C# being morphed too quickly let me say this in the nicest way possible. Who said you had to keep up with the bleeding edge? You do realize thats what you are trying to do correct?

    There are two schools of developers for any language, those who are on the bleeding edge, who’ve been using the language for some time now and are very proficient with it and have found the need for other features to be added so they can take the next step in pushing their ideas. This is how we make those advances in databinding and other features that help newer users to the languages learn easier and become more productive.

    Then there are the Jr. or Mid. level developers who are either learning the language or programming from afresh or trying to become productive/proficent with the language.

    One of the reasons I got away from Java was because the language itself had stalled and there were significant performance and productivity issues with it that weren’t being addressed and they were not interested in my development as a architect/engineer/developer. Thats when I got into C# during the Alpha .NET 1.0 and haven’t looked back since. Its because of Anders not letting C# stagnat that I have remained with the .NET Framework and C#. Its because C# and .NET are become a true enterprise class plateform that I stick with it.

    If you don’t like the pace that Anders is taking us then I suggest you slow down and don’t burn yourself out, you don’t have to keep up with the bleeding edge like those of us wanting to bring the best to C#. You don’t have to learn every feature right now, slow down and take it one step at a time and when you get the easier concepts about C# then move on to the next and the next.

    Don’t complain because of your own unwillingness to keep up and therefore stiffle others who are trying to innovate, you might wake up one day and find that others of us have grown tired of all the whining have moved on and C# has become a stagnant dead language.

  27. Mary says:

    The comment above mine is a real encouragement to me.  To put it in Mommyspeak (sorry but I’m a mom) – just because there are all kinds of advanced cycling technology out there, doesn’t mean my tot has to start there.  He’ll start on a trike, then advance to a simple bicycle and if and when he’s so inclined, he’ll advance to other types of bicycles (or horrors – a motorcycle) depending on his needs and wishes.

    I feel overwhelmed at times as a software developer but now, not so much.  I need to concentrate on being the very best with the tools at hand while constantly educating myself.  As I learn, I can decide what new tools I need to become proficient at to become more productive and/or raise the standards of my work.

  28. James H says:

    There are a lot of negative comments about changes to the C# language.  The changes in C# 3.0 were very helpful and I very much apprectiate them.  New language features which don’t muddle things (clarity/safety/efficiency) or break existing code are good.

    Particularly to "the dude", your comments are rude and completely off base.  You say how new language features are bad and then only list API changes as examples.  API / library changes and language changes are quite different.  New language features allow developers to code which is hopefully more efficient/cleaner.  But they shouldn’t break or change existing code.

    API / library changes frequently break existing applications.  At least the way Microsoft handles their libraries.  The .NET developers I know are afraid to use *ANY* 3rd party libraries or components because future Microsfot changes may break them and put us in a bad situation.  This is a very bad place to be.  When developers are worried about future compatibility because upgrading generally means having to re-write sections of an applciation that is completely unreasonable.  But these problems are caused by changes in the LIBRARY, not the language.  Why Microsoft is obsessed with changing how their libraries do things is a mystery to me.  Actually, I suspect its because they rush features to market without thinking them through fully and then have to reinvent them because of issues that became clear later.

    Anders work is outstanding.  I’ve been a devoted Delphi developer since the days of TP4.  More recently I’m working in C# and am very happy with it.  The language and the CLR are very nice (though I wish Delphi style enumerations and class types were supported).  The Visual Studio IDE, though, I really don’t like.  I’m still at least twice as productive in Delphi 7’s IDE.

    Actually, just in case it ever manages to percolate up, I hope class types do get added to C#.  Such as:

    type

     TDoesSomething = class

       …

     end;

     TDoesSomethingClass = class of TDoesSomething;

    The ability to define and use TDoesSomethingClass is very helpful.  I was writing code in C# to dynamically instantiate objects of a class supplied by the method’s caller.  Basically I’ve got a form with a panel to host a user control and I want to pass the class of user control in.  I had to resort to (.NET’s version of RTTI/reflection – I forget the term) in order to implement it.  So what I did was pass a type in, but since there is no way to prevent it any type could be passed in and the code had to check to verify it derived from user control and throw an exception otherwise.  It would be more type safe and preferable if I could just specify the equivelant of a class type here.

  29. Juliano says:

    like a Fox, incredible but really.

  30. roxx says:

    I do agree that change in any direction is necessary.  C/C++ are great languages, but they do not open the doors to flexible programming that C# and other languages that work to implement new concepts and technologies.

    However, I do think there is a time to slow the pace.  If it was my job to stay on top of technology and learn every new thing that ever came out, this would be fine.  However, every hour of my job is earning money for my company, and every hour spent having to learn new things is taking money away.  Additionally, there’s no way I’m going to dedicate that much time to learning new things that are going to rapidly change again.  That may "put me behind the curve", but there is such a thing as a sensible studying.

    Thanks

  31. Yort says:

    I got really excited when Anders talked about trying to make the various languages have the same or similar features… until he said C# wasn’t getting XML literals.

    To be honest, I don’t want XML literals, but I would kill for dynamic interfaces and the ‘retry’ keyword from VB.

    it sounds like maybe I can look forward to dynamic interfaces at some point in the future (these are interfaces that an object can be cast to, without the object’s class definition actually ‘implementing’ the interface), but I may be out of luck on the retry keyword ?

  32. fooshot says:

    Loved Delphi, love C#.

    The discussion does seem to be one on "why so many changes".  And I’d like to chip in that there are commercial downsides to languages changing too fast.  I think it’s harsh to label concerns as whining.

    We’d all like to work on the bleeding edge (or most of us – assuming we’re proud geeks, it’s fun).  And it’s nice to hear about what’s going on too.

    I just know I’ll have trouble convincing the technical director to allow us to change again.  Since, and perhaps rightly so, he is cautious of change screwing up things.

    He has to consider the budget, staff training (which is a time cost even if done at our own desks), the chance of errors being introduced from developers being inexperienced with new features.  Getting the senior developers up to scratch to even spot those potential errors in code reviews.

    Fun it always is, but language changes will also always incur an expense.  And balancing whether to make the move and hope the expense is counterbalanced is not a snap decision.  We have paying customers to please that wont appreciate that I get to play with something new, they need to see real visible benefits.

    Play with it? of course I will.  Use it commercially? I suspect I won’t be allowed to until I can demonstrate real tangible benefits to upper management.

  33. arshad says:

    Dear sir,

    I have often seen the link of C# and .net version. I think this make no matter whether one use .net 2.0 or any other version with c# programming.I am also a C# programmer. please release my confusion as possible.

  34. SkyBeaver says:

    I notice a lot of developers echoing the same concern, that the pace of change in the C# language over the past three years or so seems to have accelerated dramatically. I also hear a common refrain from the Microsoft folks, which is "quit your whining and get over it".

    Tip O’Neill once famously observed that "all politics is local".  What he could have added is that "politics plays into EVERYTHING, even what features get included in a programming language".

    Around the year 2000, C# was the undisputed Lingua Franca of .NET.  C# was intended to be more than just the "gold standard" for hard core Microsoft developers, replacing C++.  It was also intended to replace Visual Basic as the business application development language of choice.  It succeeded on both these fronts.

    Recently, though, some other languages have begun to challenge C# as the "it" language within Microsoft.  F#, IronPython, Ruby, etc. all now are emerging as potential threats to the preeminence of C#.  For the first time, the C# teams now faces the challenge that new, high-profile software development projects within Microsoft might be done in languages other than C#.  This cannot be good for the bonus pool. Meanwhile, the CLR is being modified to support all of these new languages, and C# loses even more of its lustre if it cannot support these new CLR features.

    And so, we end up with new features in C# that NO ONE in the business developer community is asking for, such as these new dynamic features.

    C# is becoming the new Ada — big, bloated, adn over-engineered.

  35. Paul says:

    I’m not sure why people are complaining about so many changes. If you don’t like them then don’t use them. You can still use the same core features of C# as you could in version 2.0 for example.

    I think its great that the language I chose several years ago when it had only just come out as evolved into something so great. Many businesses are now using C# compared to VB.NET. This isn’t a coincidence.

  36. Ala Qunaibi says:

    Mr.Anders Hejlsberg  I respect you,

    We need book about C# 4.0 written by you.

  37. alex says:

    c# is just a java clone with few additions.

  38. john says:

    @SkyBeaver:

    "For the first time, the C# teams now faces the challenge that new, high-profile software development projects within Microsoft might be done in languages other than C#." is a contradiction of "new features in C# that NO ONE in the business developer community is asking for", if one is saying that high-profile software development projects are built in the business developer community.

  39. Gerardo Recinto says:

    iDynamics sounds fantastic. I haven’t really gotten into the details of it yet. First time I heard and read some samples, it dawn on me this maybe what may solve my problem on lack of dynamic Type Factories/consumption in c#. Maybe not, however it sounds getting closer. Well, my intention is not to discuss what I just mentioned so I’ll move on… 🙂

    Thank you very much for the cool features the c#(and .net framework) team had given us across the years. I greatly appreciate all of these. I am using a fantastic language and a fantastic framework.

    However, let me jump to my main question: Is there "progress" going on in the Optimizing compiler arena? I am hoping someday the end-to-end process of c# compilation to MSIL and JIT compiler compilation to machine code WILL approach or proximate the level of Optimization generated by the c++ optimizing compilers available. I can imagine this, with enough facility provided in generated MSIL, that the JITter can take advantage of, we can probably create an overall sln that can do this.

    For now, since nothing really beats c++ to this, most projects still get written and will continue to be so using c++.

    Anyway, thank you very much again for delivering fantastic feature set for us, across these years mr. Anders!

    -Gerardo Recinto

  40. Manoj says:

    If you have any C# 3.0 video tutorials please send your  reply to manojkavali@gmail.com

    I need it ASAP

    Regards

    Manoj

  41. Jag says:

    I am a c++ programmer. I have been hearing the buzz of c# around all the corners. I want to give it a try; need a nice book that will help me to jumpstart. Your suggestion will be helpful – which book? c# version? Thanks    

  42. Jag says:

    I am a c++ programmer. I have been hearing the buzz of c# around all the corners. I want to give it a try; need a nice book that will help me to jumpstart. Your suggestion will be helpful – which book? c# version? Thanks    

  43. Peter J. says:

    Hi

    How can I communicate with a serial camera and save pictures and video by c#?

    is there any class?