Results 1 to 39 of 39

Thread: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

  1. #1

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    This question goes out to C# novices and the experts.

    If you could change something about C# what would it be?

    Novices - You know the things that annoy you right from the start that an expert might have gotten used to and forgotten.

    Experts - You have detailed knowlege of the language and know what is lacking and what should be changed.

    I am collecting this information to help in the development of LightFusion™. It is a programming lanuage being created by VBF's very own Jacob Roman, Penagate, ChemicalNova and myself (eyeRmonkey). Any and all input you have will help us a lot.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  2. #2
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Coming from VB, I miss the "With" statement
    Also the "Select Case" are not that smooth

    PS: May I suggest finding one central place we can look at suggestions, etc, so we don't all go and type the same stuff over and over?
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  3. #3
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    The IDE re-formatting my code, I make how I want it to look close it then when I re-open it it has been changed. HTML is even worse in ASP.NET.

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by GlenW
    The IDE re-formatting my code, I make how I want it to look close it then when I re-open it it has been changed. HTML is even worse in ASP.NET.
    hmm that usually doesnt happen in C# (it reformats you code when you close a bracket though,,, so you could just undo and it changes back to the old formatting)... I hate that too

    I dont think the WITH statement or anything like that will be implemented (I read about it on a msdn blog also) because they want to model C# based on C++ and similar languages. Such languages never featured a with statement.

    anyways, I REALLY wish there were inline functions in C#
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by MrPolite
    hmm that usually doesnt happen in C# (it reformats you code when you close a bracket though,,, so you could just undo and it changes back to the old formatting)... I hate that too

    I dont think the WITH statement or anything like that will be implemented (I read about it on a msdn blog also) because they want to model C# based on C++ and similar languages. Such languages never featured a with statement.

    anyways, I REALLY wish there were inline functions in C#
    I think a WITH statement is the easiest thing in the world to do if you simply add it in the object name before the source is send to the interpreter/compiler. The only way it would be hard is if you tried to do some optimizations using WITH (which we might do).

    Yes inlining was one of the first things we decided to do (Jake's idea).
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    You n00bs...hehehe...why is everyone starting to talk about the VS IDE when we talk about C#....it has NOTHING to do with C#. You can write C# code in Notepad if you want. It doesn't reformat your code. And if you have payed millions of dollars to get the VS IDE, you can turn off the formating you don't like. Like here at work when I am in Windows and I am coding in C#, then I turn off the automatic formating of my brackets. The VS IDE automaticaly put your brckets like this:

    Code:
    if (gay)
    {
        // Do something
    }

    But I think that takes one line too much. And since I started out as a VB guy, I am used to have the "then" word on the same line anyway. So I turn this future off. So I have it on the same line. And you can do that too, but it has still nothing to do with the language C#.


    Ok, now over to what I would have changed.
    1. A possibility to force the GB to collect an object RIGHT THERE AND THEN. And not just marking an object as ready to be collected.

    2. The event handlers are confusing for many new programmers. And the way they are handled in C# is error prone when it comes to memory leaks. Since it is hard links. Meaning that the GC might think that your object is still in use even if it might not be. A better and cleaner solution would be like QT does it. Using signals/slots. But then again, there is nothing wrong with using QT# to make your GUI apps in C# either though. So this was more of a rant then anything else..


    - ØØ -
    Last edited by NoteMe; Sep 15th, 2005 at 02:13 AM.

  7. #7
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by NoteMe
    You n00bs...hehehe...why is everyone starting to talk about the VS IDE when we talk about C#....it has NOTHING to do with C#. You can write C# code in Notepad if you want. It doesn't reformat your code. And if you have payed millions of dollars to get the VS IDE, you can turn off the formating you don't like.
    ...and you should read the monkey's original post

    Remember, there is no single language who's compiler can make use of ALL functionality offered by the CLR. Only MSIL can do that. If I don't have it wrong, there's about 40 languages with compilers that target the .Net Framework.
    The way I understood Monkey, is saying he want to create another language with compiler, that uses a C# like syntax, with the changes one would make to C# if you could.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  8. #8
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    "But then again, there is nothing wrong with using QT# to make your GUI apps in C# either though. "
    what?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  9. #9
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by MrPolite
    "But then again, there is nothing wrong with using QT# to make your GUI apps in C# either though. "
    what?

    What did you not understand?

    - ØØ -

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by StrangerInBeijing
    ...and you should read the monkey's original post

    Sorry, I read it again. And I still don't see what you mean. He is asking about the language right?

    Quote Originally Posted by eyeRmonkey
    If you could change something about C# what would it be?

    And they answered about one IDE that you can use to code C#. Can you please explain to me what you mean, since I am a bit tired this morning..


    - ØØ -

  11. #11
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Yeah....you're right...where's the darn Monkey?
    Lets' wait and let him explain
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  12. #12
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Sorry, but now I am completly lost here...I don't even think that "red cross" can get me back to shore again now.. Come again please..


    - ØØ -

  13. #13
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    It's nearly week-end mate. Just hang on in there
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  14. #14
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Hehe..thanks. I am going out drinking after hours today. That is for sure.


    Well, I remembered one more thing that annoys me. That there is NO way to find out the size of a managed object for sure. SizeOf and SizeOf Marshal thingy is not enough. C# should have a clean interface to find out the size of an object. But the framework makes that hard for any lanaguage though..:


    - ØØ -

  15. #15
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    I am fairly sure that it will not be a managed environment So no garbage collector. But there will be a sizeof() operator and not being managed it should be a breeze.

    Note can you show me how you do error handling in C#? Is it Try/Catch etc. like in C++?

  16. #16
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Yeah, you are basicaly casting exceptions. I hate that. I like much better error codes as return values, ther use pointers or references for the parameters. That is MUCH faster. Error handling in C# and C++ is INCREDIBLE slow...


    - ØØ -

  17. #17
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Basically like Win32 APIs then? Status code as the return value and extensive use of out parameters. I prefer that too, although I like the SEH syntax it is as you say rather inefficient.

  18. #18
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Yeah, return codes. Not sure what the system is called but you know....ehh...in binary. So one return code can mean more then one thing if it has too. Like you have return code:

    1
    2
    4
    8
    16


    but not those in between, so if you get return code 7, then you know that you have 1,2,4.


    - ØØ -

  19. #19
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    I know what you mean, don't know what they are called either

    basically

    1 = 00001
    2 = 00010
    3 = 1 and 2 = 00011

    etc.

  20. #20
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Yeah, you got it..

  21. #21
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    These are called Bit Fields and Flags depending upon how they are used.
    I don't live here any more.

  22. #22
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by penagate
    1 = 00001
    2 = 00010
    3 = 1 OR 2 = 00011
    I couldn't resist.
    I don't live here any more.

  23. #23
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Ah, shove it

  24. #24

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by StrangerInBeijing
    Yeah....you're right...where's the darn Monkey?
    Lets' wait and let him explain
    My original question was intended to get this point across:

    "What do you not like about your current (or past) programming experience."

    I am looking for things to include (or leave out) of LF to make it the best language it can be. This includes things like IDE, syntax, compiler, libraries, etc.

    Did that clear things up?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  25. #25
    Junior Member
    Join Date
    Sep 2005
    Posts
    17

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Well, I am a novice,

    But coming from VB.NET. In VB.NET after you press enter, the IDE automatically put the closing statement for you. For example
    IF bla bla THEN [Press Enter]

    //And the IDE, will automatically put

    END IF

    Another annoying thing is that, after you double-click on a control (let say a button). And you change your mind that you dont want to write a button1_click (event-method) and erase the whole Public bla bla { }, and build ur project. The compiler will tell you that "your form" does not contain a definition for button1_click.

    Well you can just delete the code that is being pointed out by the compiler... But, it still annoying

  26. #26
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Make it as low lang as Assembler & C , and as simple as VB.NET .

  27. #27
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    We've decided that it should be easy to tell what assembly code is being generated from the LF code.

    Here is the list of rules we have so far.

    If anyone has any suggestions that aren't directly related to improvements on C#, VB.NET, VB6, C++, please post in that thread

  28. #28

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by Pirate
    Make it as low lang as Assembler & C , and as simple as VB.NET .


    Not quite possible. First off assembler and C are exteremly different and you cant have a simple low lang. Its just one of the sacrafices you make (low=fast, high=simple).
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  29. #29
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Quote Originally Posted by eyeRmonkey


    Not quite possible. First off assembler and C are exteremly different and you cant have a simple low lang. Its just one of the sacrafices you make (low=fast, high=simple).
    That's the point , if you can't make something brilliant , then don't . Guys , I'm not fraustrating you but think if this lang can't emulate other langs , then nobody would even try to learn it or install it . Good luck anyways .It's challenging and interesting !!

  30. #30
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    LF should include an easy way to break out of double loops, since it is impossible to use the 'break' statement twice and i would never consider using 'goto'.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  31. #31

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Why couldn't you use if statements to get out of the loop just as you would any single loop? Why wouldn't break work twice (we probably won't use break, but maybe).
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  32. #32
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Because once you break out of one loop you jump into the enclosing loop. You'd need a flag to say that you'd broken from the inner loop, and check that flag to see whether to break out of the outer loop also.

    Sometimes break is useful. Maybe we should be able to specify how many levels to break out of, e.g.

    Code:
    for (i=0; i=5; ++i) {
        for (j=0; j=5; ++j) {
            if (j=3) break(2);
        }
    }

  33. #33
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    And/or
    Code:
    breakall;

  34. #34
    Lively Member deranged's Avatar
    Join Date
    Jun 2004
    Location
    TN
    Posts
    104

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    I just recently came to C# from VB6, and I miss optional arguments the most. I know about overloading and how to do it, but I still like optional arguments the best.

  35. #35
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Multiple inheritance with Classes (not interfaces) just like in C++.

  36. #36
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by Pirate
    Multiple inheritance with Classes (not interfaces) just like in C++.
    that'd make things really complicated
    C# isn't for doing super super l33t stuff you know
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  37. #37
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by penagate
    Because once you break out of one loop you jump into the enclosing loop. You'd need a flag to say that you'd broken from the inner loop, and check that flag to see whether to break out of the outer loop also.

    Sometimes break is useful. Maybe we should be able to specify how many levels to break out of, e.g.

    Code:
    for (i=0; i=5; ++i) {
        for (j=0; j=5; ++j) {
            if (j=3) break(2);
        }
    }
    if you really have to, use a goto statement
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  38. #38
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    Quote Originally Posted by MrPolite
    if you really have to, use a goto statement
    from The C Programming Language (K&R):
    Quote Originally Posted by Kernighan & Ritchie
    C provides the infinitely-abusable goto statement, and lables to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it.

    ...
    Code that relies on goto statements is generally harder to understand and to maintain than code without gotos.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  39. #39
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: What Would You Change About C# if You Had The Chance? (For Novices and Experts)

    lol I'm well aware of that.
    but instead of re-inventing a new feature like that, if you're so desparate, you can just simply use the goto statement
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width