So isn't Java better?
So isn't Java better?
Actually, I'm a card carrying Java hater. C is my favorite language, then C++, then C# for graphical applications. Though liking C# and not Java is a bit hypocritical since they are so similar. I maintain the argument that C# feels better.
-Prelude
My best code is written with the delete key.
Is it because Java is sort of like putting blocks together, like in Visual Basic? C# is still pretty rare isn't it?
I don't find the syntax intuitive, with C, C++, C#, COBOL, etc.., I can look at the code and it will make some sense. I can follow the flow of control easily and guess what will happen when the program is run. Java isn't like that for some reason, I look at the code and find myself saying "what?". I'm probably just weird, but that's how it is.
>C# is still pretty rare isn't it?
C# is a very new language just getting it's foot in the door. If the .NET framework ends up being a success then C# will be THE language for Windows programs because it's so concise. Whereas a C Windows program might take 150 lines to create a window and place a message there, C# can do the same thing in about 10 - 15 lines. That's a huge difference.
-Prelude
My best code is written with the delete key.
Actually, Prelude, C++ can do all that and more! My c++ Windows class creates a window in a single line of code, and handles screen buffers, painting, clicking, printing, etc effortlessly and elegantly in less than (or close to) 15 lines. I highly recommend that you incorporate as much C++ into your C programs as possible...Cheers.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Does this close to 15 line program include everything in the class as well? Because I'm talking about straight C#, open your favorite text editor and after about 2 minutes you've written a window with plenty of frills and a message from scratch.My c++ Windows class creates a window in a single line of code, and handles screen buffers, painting, clicking, printing, etc effortlessly and elegantly in less than (or close to) 15 lines.
-Prelude
My best code is written with the delete key.
For practical purposes it wouldn't matter, someone could build a C++ library/IDE that does what C#/winforms does . If someone is using the net framework as a library, then I don't see why they couldn't use their own library if they'd gone to the trouble of coding it. However I suspect Sebastiani's library seems simple/all encompasing/flexible to him because he coded it and therefore knows it inside out and has only used it in a limited way. Otherwise he should submit it to MS as an MFC replacement.Does this close to 15 line program include everything in the class as well? Because I'm talking about straight C#
Here's a good example, my ClickableText class:
With C++, the only limit is the imagination of the programmer!Code://...global... ClickableText area; //...in WinFunc... area.Print("\n\n Click Here"); //...in WM_LBUTTONDOWN... if( area.Clicked("\n\n Click Here", LPARAM)) MessageBox(NULL, " Good Job! ", "You Clicked Some Text!", MB_OK);
I am sure that C# is a great language, but, I am a stubborn Texan who would rather write a library than learn someone elses!
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
>I am a stubborn Texan who would rather write a library than learn someone elses!
Which is ok if you are working alone. Otherwise people will have to learn how to use your library rather than working with one they already know.
Prelude,
If C, C++, C#, and Cobol make sense to you, it's probably Java that is weird, not you. I've noticed that Deitel does a progression through C, C++, and Java. Have you looked at it?
Incidently, we've disagreed over books. I don't think there is a perfect book out there. I try to get a half dozen because that way if I understand one or more I'm okay.
I wonder if Shiro will post here. S/he loves it. At least, that is my impression from how s/he speaks about it. Personally, I have yet to form an opinion on it because I am still learning it.
:-)
There is actually no language that I love most. I like, C, C++ and Java and have no experience about C#, but I've seen some code and it looks a lot like Java. Java is a language with heigher abstraction than C.
When working with large code I take a look at the designs before diving into the code. After I've understand the designs, the Java code is quite easy to read. When I started learning Java it was quite difficult to understand the code with just reading it.
The reason why I'm so enthousiastic with Java is my experience with it and the applications I see being build with Java. Lots of devices have a JVM on which Java applications run, which gives the devices a great flexibility and allows devices to have many functionality on it.
Though this all doesn't imply that I love it more than C or C++. When it comes to lower level programming, I prefer C or C++. As being a perfectionistic technician, I'm always trying to create the best technical solutions. Which is impossible when using just one language, each language has its things which make it better for specific tasks.
Shiro,
I was just wondering why the coding contests seem to be held in Java, rather than C or another language?
Sebastiani, you ever thought of adding in an area to your class where you could store the current text that's in the ClickableText area? It would sure make things easier, and you could add a ClickableText.getText() function.
what are all this arguments?
why not just aregue in c because this is c board
" programming is 1% syntax and 99% logic "