Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / I just lost Respect for .Net today It's another OOP (limited) CLONE! So Sad :(

Author
Message
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 22nd Apr 2008 17:21
This made for same very interesting reading. Just going to add my quick thoughts.

C# is indeed newer, and is the ++ to C++ AKA C++++ or c#, but I dont care what anyone says it is cumbersome. I'll never forget adding a "form, window, layer".. whatever they call it and thought COOL!! code.. made for me, lets change a few things in it.. 50 lines later, i think.. well now lets see here ill just move this button over a tad.. what??? my code is now gone? that dirty little....

Granted m$ has done some good things, but c# is not one of them. Like everything else its their way of forcing things upon us all. C# does have a few thing over c++ granted, but I'm sticking with c++. Plus i aim to be cross platform oriented anyways.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 22nd Apr 2008 17:25
Quote: "made for me, lets change a few things in it.. 50 lines later, i think.. well now lets see here ill just move this button over a tad.. what??? my code is now gone? that dirty little...."


I've never experienced this, did you by any chance add the code to the designer generated code file, where it says do NOT modify this file. If so, this would explain it you shouldn't add code to this file.

'We all have something to bring to this discussion but, I think the thing you should bring from now on is silence!' - A J Rimmer
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 22nd Apr 2008 17:48
Sometimes it's hard for me to draw a dividing line between C# and the .NET environment and thus hard for me to say exactly what makes things easier than programming in C++. So much of the things associated with the C-series of languages are really the libraries that come with them. I'm certainly more comfortable with C++ but studying C# has led me to a number of things that have made my programming faster.

The one thing about C# that logistically fries my brain is the same thing that Java does, invoke an instance of the class within the class itself. Not necessary for simple programs but when it is required it feels so.... recursive.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Apr 2008 05:56
I never experienced what you described Lilith. Hmm.. Maybe I have and didn't realize it. I personally often have references to a class or other classes in a class.. but they are really insttiations... its either short hand - or a way of accessing things OUTSIDE the class... Like One class uses a reference to one of its comrades.

MainClass{
LittleClassModule
AnotherLittleClassModule
}

Example:


Each of those little classes now has a reference to the MAINCLASS ... and I can make some cool modular code like this.

Categorized... yet - able to jump out the category "Box" if necessary. Some caution is required - in you have to know when its SAFE to do that trick...

Like... the First LittleClass Should NOT try to Access the ANotherLittleClass (the way the above example is written) UNTIL the "anotherlittleclass" is instantiated. (otherwise you are asking for it )

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd Apr 2008 06:13 Edited at: 23rd Apr 2008 06:13
Much of the code I see is something like this: (mind you I'm doing this on the fly)



Some codes do a call to Application.Run() which I believe is something of an aliasing to the same thing.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Apr 2008 14:27
Yeah I've seen that. I know why they do it too. It encapsulates the whole application to one class you can just delete and it in theory cascades and shuts everything down cleanly.

I don't write stuff exactly like that myself.. but I do have in my library of code, a global namespace... and it has all the module classes in it.. but there is this class called the "Daddy" class, that is responsbible for starting EVERYTHNIG, updating everything, and shutting everything back down.

I think MS does that alot so all your coding is an even driven extension to their framework.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd Apr 2008 17:22
I do similar stuff to encapsulate my applications, albeit I've only started that recently. In fact, my OOP for GDK (being investigated by the FBI and the GOP on behalf of IRS) pretty much demands this approach. But it doesn't have main() embedded in the class and it doesn't have an instance of itself embedded in the class.

I'd actually seen an HTML CGI API do something like this but when I tried to embed main() in a test C++ class of my own it refused to compile.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 23rd Apr 2008 22:34
Quote: "I've never experienced this, did you by any chance add the code to the designer generated code file, where it says do NOT modify this file. If so, this would explain it you shouldn't add code to this file."
Man that was ages ago. I can say if it was in such an area, but everyone that worked with c# at the time said thats true, welcome to c#.. Thats when I bailed.

Login to post a reply

Server time is: 2024-11-20 07:23:36
Your offset time is: 2024-11-20 07:23:36