Coffeehouse Thread

43 posts

any plans to make C# more dynamic in future?

Back to Forum: Coffeehouse
  • Ion Todirel

    I hope they have, i tought new language features, in C#3.0, will add some dynamism to language but i was wrong. So what do you think will C# be more dynamic in future?

  • phreaks

    Ion Todirel wrote:
    

    I hope they have, i tought new language features, in C#3.0, will add some dynamism to language but i was wrong. So what do you think will C# be more dynamic in future?



    Define Dynamic....

    .NET is pretty 'Dynamic' now now?

    Anonymous methods, Generics, Reflection... what specifically are you looking for?

  • Human​Compiler

    Explain "more dynamic"...

  • Ion Todirel

    change code structure in run time without using reflection, but using language constructs (that use reflection) 

    HumanCompiler wrote:
    Explain "more dynamic"...
    if you look like this C# isnt dynamic at all

  • CyberGeek

    Ion Todirel wrote:
    change code structure in run time without using reflection, but using language constructs


    Or he could've meant that, heh.

  • CyberGeek

    Dynamic probably refers to dynamic typing. With dynamic typing, you have the option to lob any object into a catch-all data type (called 'id' in at least one dynamically-typed language) and then invoke any method on that object. At run-time, a check will be performed whenever you invoke a method on an object that's been typed with this catch-all type to ensure that the object actually does respond to the method. If it does, then the method will be invoked. If it doesn't, then an exception will be raised. Dynamic typing reduces run-time performance slightly and also introduces a new class of run-time bugs, but at the same time can dramatically increase productivity by requiring you to write far less code (things like interfaces and generics can basically go away), and improving the modularity of the code that you do write.

  • Ion Todirel

    HELLO ANYONE?

  • phreaks

    Ion Todirel wrote:
    HELLO ANYONE?


    Can you cite us an example of your concept?

  • Chadk

    phreaks wrote:
    
    Ion Todirel wrote: HELLO ANYONE?


    Can you cite us an example of your concept?

    He is asking, if C# are gonna be like VB.net.

    The answer is likely no. Anders H. is making a language, where the main feature, is that its VERY strongly typed, and very clear language.

    Making C# dynamic, would break that.

  • Sampy

    LINQ requires a lot from the languages in terms of dynamicness (which is totally a word). By bringing this feature to the language, a lot of things will come with it.

    I don't have tons of specifics (now that I'm no longer in DevDiv, I have to expend more effort to glean secrets Smiley) but I know that there are lots of cool things coming in C# 3.0/VB 9 that add a lot of dynamic flavor to .Net. Stay tuned.

  • wkempf

    I thought all of the changes coming in C# 3.0 were already revealed. "var" keyword, lamdas, expressions, etc.  Nice new features, but they don't make C# dynamic in the sense that object's can have features added to or removed from them at run time.

    BTW, all of those new features are available today in the LINQ CTP.

  • littleguru

    Please not! Don't make it to dynamic. That makes code unreadable. It's nice for little projects, but hard if you have big projects and a lot code... Let it as it is right now. You could write your own classes and use existing constructs to encapsulate the reflection stuff...

    Make it dynamic were required, but don't overdo it.

  • Harlequin

    By CyberGeeks description it sounds like it could and would intice sloppiness and rushing things, no?

  • Ion Todirel

    littleguru wrote:
    Please not! Don't make it to dynamic. That makes code unreadable. It's nice for little projects, but hard if you have big projects and a lot code... Let it as it is right now. You could write your own classes and use existing constructs to encapsulate the reflection stuff...

    Make it dynamic were required, but don't overdo it.
    you always say no, why do you think that a dynamic language makes code unreadable?
    Harlequin wrote:
    By CyberGeeks description it sounds like it could and would intice sloppiness and rushing things, no?
    what? Perplexed

  • littleguru

    I had to maintain code in old VB 4,5,6... It's a pain.

    variant b = 1
    b = "123"
    b = 1.2

    You never know what the current type of the variable is. I mean you never know it from just inspecting a piece of code. You need to know all the ways how the code is entered etc.

    I'm against methods that look that's definitions look this way:

    public var Foo(var j, var g)

    I'm not against dynamic languages at all! I like Haskell or Lisp. But I think if somebody extends a language it should be well thought and not everything at once! Tweak it were tweak is necessary and not add everything, just because one guy wants it. That leads into complex scenarios. I'm also a guy that likes the easy stuff. Something that is complex, is just something easy made complex. The real goal is to make stuff easy. Not complex.

  • littleguru

    I know that you could use System.Object instead of variant. That would be the same, but adding generics to .NET 2.0 was the right decission. It finally took that away from us. It makes the code so much easier to read.

    As said: I'm not against dynamic mechanism at all! What do you exactly want more dynamic and how should it look like. I think that you should specify exactly what you want, instead of just calling for a more dynamic language!

  • littleguru

    Ion Todirel wrote:
    change code structure in run time without using reflection, but using language constructs (that use reflection)


    That is to vague... You should try to specify exactly what you want.

  • Ion Todirel

    littleguru wrote:
    But I think if somebody extends a language it should be well thought and not everything at once! Tweak it were tweak is necessary and not add everything, just because one guy wants it. That leads into complex scenarios. I'm also a guy that likes the easy stuff. Something that is complex, is just something easy made complex. The real goal is to make stuff easy. Not complex.
    i totally agree with you.
    littleguru wrote:
    What do you exactly want more dynamic and how should it look like. I think that you should specify exactly what you want, instead of just calling for a more dynamic language!
    well i want many things Tongue Out, like i said before would be nice to have some language constructs to add code dynamically (or other dynamic things) but this will make language too complex, like you said. Other dynamic stuff, would be nice to use data without declare it. What i asked is just what do you think they will add in new versions of C# (4.0/5.0). And what dynamic stuff you would like to see in future versions of C#.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.