Re: C# code
right. thanks for clarifying.
I agree with your analysis. you never get to see how ugly C++ is if you are
right up in there working it.
I always barked at people who claimed C++ was ugly. Then I spent a year in
C# came back to C++ (to help a student write some code actually) and I was
like 'what the f#$%@ is this S@#$%% That's when it hit me how bad the model
was. That's when I could see what the java programmers were fussing about.
That's when I realized pointers and pointer syntax was difficult if not
problematic.
But there are still some good things about the language though. I like STL,
templates, generics, the idea behind ATL and gowd bless the MFC. Still, say
what you want, C++ is intimidating. I now see that it doesn't need to be. It
is pointlessly intimidating. Its such a pitty that folk like Stroustrup and
Gosling cannot see the error in their ways and embrace this new language,
maybe even copy from it to extend C++ and breathe new life into it a dying
platform, cuz it's going down.
regards
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Daniel O'Connell" <onyxkirx@--NOSPAM--comcast.net> wrote in message
news:7piob.6534 1$Tr4.174983@at tbi_s03...[color=blue]
>
> "Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in
> message news:%23Jc9T2vn DHA.3612@TK2MSF TNGP11.phx.gbl. ..[color=green][color=darkred]
> > > I recently had to go write a MC++ class and got a reminder on how[/color][/color]
> annoying[color=green][color=darkred]
> > > it was to have to double define methods,[/color]
> >
> > No runtime allows double definition of methods, I'm sure I must have[/color]
> missed[color=green]
> > your point. Would you care to clarify?. Overloaded methods are entirely
> > different.
> >[/color]
> I mean, for example
> //in a header file
> void MyFunction(Stri ng *x);
>
> //in my CPP file
> void MyFunction(Stri ng *x)
> {
>
> }
>
> then, I want to change MyFunction to MyFunction(Stri ng *x, int y); I have[/color]
to[color=blue]
> change the code in 2 places, which I find to be a bad design, two
> definitions of the method that must match.[color=green]
> > --
> >
> >
> > -----------
> > Got TidBits?
> > Get it here: www.networkip.net/tidbits
> > "Daniel O'Connell" <onyxkirx@--NOSPAM--comcast.net> wrote in message
> > news:lq0ob.5962 9$Fm2.42234@att bi_s04...[color=darkred]
> > > Interesting, one of my favorite features of C#(and java, I suppose)[/color][/color][/color]
was[color=blue][color=green]
> > the[color=darkred]
> > > death of the header file.
> > >
> > > I recently had to go write a MC++ class and got a reminder on how[/color][/color]
> annoying[color=green][color=darkred]
> > > it was to have to double define methods, to have parameter lists and[/color]
> > return[color=darkred]
> > > types defined in TWO places, or my favorite in C, where if you forgot[/color][/color][/color]
to[color=blue][color=green][color=darkred]
> > > define a method the compiler couldn't find it... Hell, when I'm[/color][/color][/color]
writing[color=blue][color=green]
> > C++[color=darkred]
> > > code under 500 lines I'll often write my classes like I would in C#.
> > >
> > > I personally do not want to go back to these days, I would risk saying[/color]
> > that[color=darkred]
> > > it wasn't overlooked but turned down inherently.
> > >
> > > I guess I jsut don't like header files...I wonder what others think.
> > >
> > > "Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote[/color][/color]
> in[color=green][color=darkred]
> > > message news:%23VA%23bo pnDHA.2732@TK2M SFTNGP11.phx.gb l...
> > > > C# is great but it does have some short comings. Here, I examine one[/color][/color]
> of[color=green][color=darkred]
> > > them
> > > > which I definitely think is a shortcoming.
> > > > Coming from C++, there seems to be no equivalent in C# to separate[/color][/color]
> code[color=green][color=darkred]
> > > > cleanly for the user's benefit. Why is this important? Because a[/color][/color][/color]
user[color=blue][color=green]
> > gets[color=darkred]
> > > > to maintain this code, not a machine. C++ exposed us to header files[/color]
> > which[color=darkred]
> > > > was a way, among other things, to cleanly separate class[/color][/color]
> implementation[color=green][color=darkred]
> > > from
> > > > declaration. Why was this overlooked in C#? Mixing implementation[/color][/color][/color]
and[color=blue][color=green][color=darkred]
> > > > declaration inside a class is so ugly. Yuck!
> > > >
> > > > Sure intellisense can take you a long way, but it's a bandaid on a[/color]
> > bruise.[color=darkred]
> > > > Though it is possible to separate classes out into namespaces in C#[/color][/color]
> you[color=green][color=darkred]
> > > > still have to port the implementation with it. Yuck! A class can be
> > > > conceived without an implementation, if only for discussion[/color][/color][/color]
purposes.[color=blue][color=green]
> > You[color=darkred]
> > > > are not always interested in the implementation, that is why it is[/color][/color][/color]
so[color=blue][color=green][color=darkred]
> > > yucky.
> > > > What if you want to take the class function declarations with you to[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> > > > meeting to talk about your new class? This does actually happen[/color][/color][/color]
quite[color=blue][color=green][color=darkred]
> > > > frequently. You can't do that in C# without intimately knowing the[/color][/color][/color]
cut[color=blue][color=green]
> > and[color=darkred]
> > > > paste editor. Intellisense can't help you there. A class has meaning
> > > outside
> > > > of the canvas it was carved on. A class does exist outside of the[/color][/color]
> visual[color=green][color=darkred]
> > > > studio GUI. Do not forget, there is no intellisense at the command[/color][/color]
> line.[color=green][color=darkred]
> > > > Probably higher level UML tools in C# builder will fit the bill, but
> > > that's
> > > > not the point. It should be part of the language implementation[/color][/color]
> because[color=green][color=darkred]
> > > > developers get to maintain that code. It's even more troublesome if[/color]
> > these[color=darkred]
> > > > UML solutions are not included in the box.
> > > >
> > > > We've all gotten used to this mess, and if you come from Java,[/color][/color][/color]
you've[color=blue][color=green][color=darkred]
> > > always
> > > > had it so it seems odd to be without it. But it doesn't make it[/color][/color][/color]
right.[color=blue][color=green][color=darkred]
> > > There
> > > > is (make that was) a better way. I remember that time when when
> > > > implementation and declaration were different beasts. Sure the[/color][/color]
> compiler[color=green][color=darkred]
> > > > could care less if the implementation was on the moon and[/color][/color][/color]
declaration[color=blue]
> on[color=green][color=darkred]
> > > > mars, but then again, a machine does not usually get to maintain[/color][/color][/color]
code[color=blue][color=green][color=darkred]
> > > right?
> > > > So it was never about the machine. It's about making life easy for
> > > > developers. C# has failed in this regard. A more difficult life
> > > maintaining
> > > > code means less productivity. Yes, it does make me less productive[/color][/color][/color]
if[color=blue]
> I[color=green][color=darkred]
> > > need
> > > > to figure out the moving parts of a class.
> > > >
> > > > I feel better now after venting.
> > > >
> > > > --
> > > >
> > > >
> > > > -----------
> > > > Got TidBits?
> > > > Get it here: www.networkip.net/tidbits
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]
right. thanks for clarifying.
I agree with your analysis. you never get to see how ugly C++ is if you are
right up in there working it.
I always barked at people who claimed C++ was ugly. Then I spent a year in
C# came back to C++ (to help a student write some code actually) and I was
like 'what the f#$%@ is this S@#$%% That's when it hit me how bad the model
was. That's when I could see what the java programmers were fussing about.
That's when I realized pointers and pointer syntax was difficult if not
problematic.
But there are still some good things about the language though. I like STL,
templates, generics, the idea behind ATL and gowd bless the MFC. Still, say
what you want, C++ is intimidating. I now see that it doesn't need to be. It
is pointlessly intimidating. Its such a pitty that folk like Stroustrup and
Gosling cannot see the error in their ways and embrace this new language,
maybe even copy from it to extend C++ and breathe new life into it a dying
platform, cuz it's going down.
regards
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Daniel O'Connell" <onyxkirx@--NOSPAM--comcast.net> wrote in message
news:7piob.6534 1$Tr4.174983@at tbi_s03...[color=blue]
>
> "Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in
> message news:%23Jc9T2vn DHA.3612@TK2MSF TNGP11.phx.gbl. ..[color=green][color=darkred]
> > > I recently had to go write a MC++ class and got a reminder on how[/color][/color]
> annoying[color=green][color=darkred]
> > > it was to have to double define methods,[/color]
> >
> > No runtime allows double definition of methods, I'm sure I must have[/color]
> missed[color=green]
> > your point. Would you care to clarify?. Overloaded methods are entirely
> > different.
> >[/color]
> I mean, for example
> //in a header file
> void MyFunction(Stri ng *x);
>
> //in my CPP file
> void MyFunction(Stri ng *x)
> {
>
> }
>
> then, I want to change MyFunction to MyFunction(Stri ng *x, int y); I have[/color]
to[color=blue]
> change the code in 2 places, which I find to be a bad design, two
> definitions of the method that must match.[color=green]
> > --
> >
> >
> > -----------
> > Got TidBits?
> > Get it here: www.networkip.net/tidbits
> > "Daniel O'Connell" <onyxkirx@--NOSPAM--comcast.net> wrote in message
> > news:lq0ob.5962 9$Fm2.42234@att bi_s04...[color=darkred]
> > > Interesting, one of my favorite features of C#(and java, I suppose)[/color][/color][/color]
was[color=blue][color=green]
> > the[color=darkred]
> > > death of the header file.
> > >
> > > I recently had to go write a MC++ class and got a reminder on how[/color][/color]
> annoying[color=green][color=darkred]
> > > it was to have to double define methods, to have parameter lists and[/color]
> > return[color=darkred]
> > > types defined in TWO places, or my favorite in C, where if you forgot[/color][/color][/color]
to[color=blue][color=green][color=darkred]
> > > define a method the compiler couldn't find it... Hell, when I'm[/color][/color][/color]
writing[color=blue][color=green]
> > C++[color=darkred]
> > > code under 500 lines I'll often write my classes like I would in C#.
> > >
> > > I personally do not want to go back to these days, I would risk saying[/color]
> > that[color=darkred]
> > > it wasn't overlooked but turned down inherently.
> > >
> > > I guess I jsut don't like header files...I wonder what others think.
> > >
> > > "Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote[/color][/color]
> in[color=green][color=darkred]
> > > message news:%23VA%23bo pnDHA.2732@TK2M SFTNGP11.phx.gb l...
> > > > C# is great but it does have some short comings. Here, I examine one[/color][/color]
> of[color=green][color=darkred]
> > > them
> > > > which I definitely think is a shortcoming.
> > > > Coming from C++, there seems to be no equivalent in C# to separate[/color][/color]
> code[color=green][color=darkred]
> > > > cleanly for the user's benefit. Why is this important? Because a[/color][/color][/color]
user[color=blue][color=green]
> > gets[color=darkred]
> > > > to maintain this code, not a machine. C++ exposed us to header files[/color]
> > which[color=darkred]
> > > > was a way, among other things, to cleanly separate class[/color][/color]
> implementation[color=green][color=darkred]
> > > from
> > > > declaration. Why was this overlooked in C#? Mixing implementation[/color][/color][/color]
and[color=blue][color=green][color=darkred]
> > > > declaration inside a class is so ugly. Yuck!
> > > >
> > > > Sure intellisense can take you a long way, but it's a bandaid on a[/color]
> > bruise.[color=darkred]
> > > > Though it is possible to separate classes out into namespaces in C#[/color][/color]
> you[color=green][color=darkred]
> > > > still have to port the implementation with it. Yuck! A class can be
> > > > conceived without an implementation, if only for discussion[/color][/color][/color]
purposes.[color=blue][color=green]
> > You[color=darkred]
> > > > are not always interested in the implementation, that is why it is[/color][/color][/color]
so[color=blue][color=green][color=darkred]
> > > yucky.
> > > > What if you want to take the class function declarations with you to[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> > > > meeting to talk about your new class? This does actually happen[/color][/color][/color]
quite[color=blue][color=green][color=darkred]
> > > > frequently. You can't do that in C# without intimately knowing the[/color][/color][/color]
cut[color=blue][color=green]
> > and[color=darkred]
> > > > paste editor. Intellisense can't help you there. A class has meaning
> > > outside
> > > > of the canvas it was carved on. A class does exist outside of the[/color][/color]
> visual[color=green][color=darkred]
> > > > studio GUI. Do not forget, there is no intellisense at the command[/color][/color]
> line.[color=green][color=darkred]
> > > > Probably higher level UML tools in C# builder will fit the bill, but
> > > that's
> > > > not the point. It should be part of the language implementation[/color][/color]
> because[color=green][color=darkred]
> > > > developers get to maintain that code. It's even more troublesome if[/color]
> > these[color=darkred]
> > > > UML solutions are not included in the box.
> > > >
> > > > We've all gotten used to this mess, and if you come from Java,[/color][/color][/color]
you've[color=blue][color=green][color=darkred]
> > > always
> > > > had it so it seems odd to be without it. But it doesn't make it[/color][/color][/color]
right.[color=blue][color=green][color=darkred]
> > > There
> > > > is (make that was) a better way. I remember that time when when
> > > > implementation and declaration were different beasts. Sure the[/color][/color]
> compiler[color=green][color=darkred]
> > > > could care less if the implementation was on the moon and[/color][/color][/color]
declaration[color=blue]
> on[color=green][color=darkred]
> > > > mars, but then again, a machine does not usually get to maintain[/color][/color][/color]
code[color=blue][color=green][color=darkred]
> > > right?
> > > > So it was never about the machine. It's about making life easy for
> > > > developers. C# has failed in this regard. A more difficult life
> > > maintaining
> > > > code means less productivity. Yes, it does make me less productive[/color][/color][/color]
if[color=blue]
> I[color=green][color=darkred]
> > > need
> > > > to figure out the moving parts of a class.
> > > >
> > > > I feel better now after venting.
> > > >
> > > > --
> > > >
> > > >
> > > > -----------
> > > > Got TidBits?
> > > > Get it here: www.networkip.net/tidbits
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]
Comment