Click here to Skip to main content
16,007,779 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# - language design by committee ??? Pin
Nish Nishant21-Jul-02 15:49
sitebuilderNish Nishant21-Jul-02 15:49 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 15:57
protectorChristian Graus21-Jul-02 15:57 
GeneralRe: C# - language design by committee ??? Pin
Andy Smith21-Jul-02 17:07
Andy Smith21-Jul-02 17:07 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 17:14
protectorChristian Graus21-Jul-02 17:14 
GeneralRe: C# - language design by committee ??? Pin
Nish Nishant21-Jul-02 17:12
sitebuilderNish Nishant21-Jul-02 17:12 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 17:19
protectorChristian Graus21-Jul-02 17:19 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 18:01
James T. Johnson21-Jul-02 18:01 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 18:18
protectorChristian Graus21-Jul-02 18:18 
James T. Johnson wrote:
Its not that they don't know about them; but why make it look like you are making an instance method call when it is a static method call?

Because it's more intuitive to the user of the class ?

James T. Johnson wrote:
Compiles just fine.

Apparently. Blush | :O

James T. Johnson wrote:
This isn't language y, if you keep going back to wanting it to be language y you are are just going to infuriate yourself because it isn't.

That's fair, and more to the point, if I try to make C# behave like C++, I will miss out on cool stuff in C#. For example, I am getting into reflection and finding it very cool. But given that C# is clearly modelled at least in part on C++, it's reasonable to ask why this change was made, the syntax looks like C++ but behaves differently, so I assume they thought they had a good reason. I'm still waiting to hear it.

James T. Johnson wrote:
How is it counterintuitive? The method doesn't belong to an instance of the class, I think it is counterintuitive to code a static method call like it was an instance method.

I have a method I want to add to an XML wrapper class I am writing. It takes an XML node and goes through it's children looking for a text node. If it finds one, it returns the value. It's called GetText. I decided to make it static because it does not rely on the internal state of the class, but I imagine someone using an instance of the class to do other things would like to be able to type

myinstance.GetText(myinstance.FindNode("/XML/node/mynode"));

Being forced to remember what is a static method and what is not when all the methods are being used together to manipulate XML does not seem to me like a highly evolved thing to do. It's simply an annoyance.

James T. Johnson wrote:
All of the critics have lambasted VB for doing too many things for the developer on the language level, making them lazy. Oddly enough C++ does the same things but no one says a thing!

Like what ?

James T. Johnson wrote:
While we were working on the screensaver I think it is safe to say your biggest complaint was that you had to cast everything. Now we have a framework where a bad cast isn't going to ruin anything because the cast will throw an exception if it can't be made. I see that as a good thing. In fact it is close to the dynamic_cast of C++, a better match would be the as statement

I am reading the Richter book and now that I understand the as and is keywords, I think I like the C# model better than I did, but I still hate the fact that C# forces me to cast so much, especially in the case of the Clone method, containers, and using values supported in C# but not the CLR, like ( from memory ) short.







Christian

come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 18:54
James T. Johnson21-Jul-02 18:54 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 19:04
protectorChristian Graus21-Jul-02 19:04 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 20:14
James T. Johnson21-Jul-02 20:14 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 20:33
protectorChristian Graus21-Jul-02 20:33 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 21:12
James T. Johnson21-Jul-02 21:12 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:08
protectorChristian Graus22-Jul-02 12:08 
GeneralRe: C# - language design by committee ??? Pin
Gerald Schwab22-Jul-02 17:28
Gerald Schwab22-Jul-02 17:28 
GeneralRe: C# - language design by committee ??? Pin
Kevin McFarlane22-Jul-02 9:49
Kevin McFarlane22-Jul-02 9:49 
GeneralRe: C# - language design by committee ??? Pin
Eric Gunnerson (msft)22-Jul-02 6:40
Eric Gunnerson (msft)22-Jul-02 6:40 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:09
protectorChristian Graus22-Jul-02 12:09 
GeneralRe: C# - language design by committee ??? Pin
Andy Smith21-Jul-02 18:06
Andy Smith21-Jul-02 18:06 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 18:09
protectorChristian Graus21-Jul-02 18:09 
GeneralRe: C# - language design by committee ??? Pin
jparsons22-Jul-02 5:28
jparsons22-Jul-02 5:28 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:10
protectorChristian Graus22-Jul-02 12:10 
GeneralRe: C# - language design by committee ??? Pin
Rama Krishna Vavilala22-Jul-02 5:41
Rama Krishna Vavilala22-Jul-02 5:41 
GeneralRe: C# - language design by committee ??? Pin
jparsons22-Jul-02 6:49
jparsons22-Jul-02 6:49 
AnswerRe: C# - language design by committee ??? Pin
Eric Gunnerson (msft)22-Jul-02 6:36
Eric Gunnerson (msft)22-Jul-02 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.