Prelude (Java)

This is a discussion on Prelude (Java) within the C Programming forums, part of the General Programming Boards category; So isn't Java better?...

  1. #1
    Unregistered
    Guest

    Prelude (Java)

    So isn't Java better?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    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.

  3. #3
    Unregistered
    Guest
    Is it because Java is sort of like putting blocks together, like in Visual Basic? C# is still pretty rare isn't it?

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    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.

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,705
    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 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;
    }

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    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.
    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.

    -Prelude
    My best code is written with the delete key.

  7. #7
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    Does this close to 15 line program include everything in the class as well? Because I'm talking about straight C#
    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.

  8. #8
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,705
    Here's a good example, my ClickableText class:

    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);
    With C++, the only limit is the imagination of the programmer!

    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 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;
    }

  9. #9
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    >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.

  10. #10
    Unregistered
    Guest
    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.

  11. #11
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    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.

  12. #12
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    :-)

    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.

  13. #13
    Unregistered
    Guest
    Shiro,
    I was just wondering why the coding contests seem to be held in Java, rather than C or another language?

  14. #14
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    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.

  15. #15
    Registered User lliero's Avatar
    Join Date
    Oct 2001
    Posts
    59

    hi

    what are all this arguments?

    why not just aregue in c because this is c board
    " programming is 1% syntax and 99% logic "

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mats, the java answers
    By Jaqui in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-22-2008, 02:12 AM
  2. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  3. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 09:07 PM
  4. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 12:37 AM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21