Thread: About time Java gave in...

  1. #1
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413

    About time Java gave in...

    Java 9 proposal could speed some apps, but slow others | InfoWorld

    Always thought AOT compilation made the most sense whenever it were possible/practical, about time Java at least had this as an option. Wonder if they'll be taking code from gcj (GNU Java compiler).

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I wonder if this will help to bury the "JIT is faster than AOT because it will optimize for the platform" rubbish.

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Wait hold on Oracle are actually doing something with the Java platform? OMG...

    On a serious note - yeah I can see the benefits of this, and the flaws. But I think anything
    Java implements is just another feature to catch up with C#. Java was created years before
    yet C# seems to have more updates as Microsoft update it often. Quite a few people I used
    to know as Java programmers have jumped ship to C# because of Oracle.
    Double Helix STL

  4. #4
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Not trolling or anything, but can anyone actually give an example of something done with .NET that isn't total garbage? It doesn't seem that .NET itself is garbage, rather that too many programmers using it produce low quality code. No offense to anyone here, just been my observation so far.

    Actually scratch that, only thing I can think of offhand is Paint.NET, which is excellent.

    AutoCAD has gone downhill since 2009 thanks to .NET crap, getting slower and buggier with frequent .NET exception messages. Might be more of Autodesk likely joining the rest of the big tech bunch and using H1Bs, outsourcing, etc.

    Many of the PLC/HMI programming packages I have to use at work are the same, slow and buggy.

    Java software, when it was more popular, seemed to be the same way. In-browser applets that never worked, crappy printer software that never worked, PBX software that works with Java 6 but not anything later? Way to fail, crappy Java programmer.

  5. #5
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    A piece of C# that works:

    Code:
    namespace ForEpy
    {
        class Program
        {
            public static void Main(String[] args)
            {
                System.Console.WriteLine("Yay i'm a C# program!");
            
                System.Console.ReadKey(true);
            }
        }
    }


    Oh and I do get what your saying - but the problem is that manual memory languages
    such as these two are going to be praised to the high heavens all the time. Java has
    become the "college bicycle" as everyone and his cat are being taught in most schools.

    The problem I have with that, and always have had - is students are never exposed to
    lower level programming unless they seek it out-of-class. There is nothing wrong with
    learning Java/C# as a first language, in fact both are standard and fairly simple to learn.
    It would be nice if more school's went back to teaching C/C++... but hey that is a
    personal gripe.
    Double Helix STL

  6. #6
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    if more school's went back to teaching C/C++... but hey that is a personal gripe.
    I actually kind of agree, but not C++.

    Learning C was one of the better moments of my college career.

    The reason I say "not C++" (sorry, Elysia) is because I straight-up think that C++ needs literal years to learn effectively. So what happens more often than not in schools is that kids will take a programming class in C++ and they won't learn anything useful or anything they couldn't have done better in C.

    C is like 8 keywords and 8 operations, it's dead easy to learn in that sense. C++ is too big to be taught to students in a semester or a quarter.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,311
    Quote Originally Posted by MutantJohn
    The reason I say "not C++" (sorry, Elysia) is because I straight-up think that C++ needs literal years to learn effectively. So what happens more often than not in schools is that kids will take a programming class in C++ and they won't learn anything useful or anything they couldn't have done better in C.
    The university course behind Accelerated C++ is a counterexample. Now, that academic course was specifically to teach C++ to students with some programming background, but there's no reason why the content couldn't be rearranged a bit and split into two to support an introductory programming module (e.g., chapters 0 to 5, 7, 9, and additional material for general computer science, compiling/debugging, problem solving skills, and recursion) followed by a data structures and algorithms module (e.g., chapters 6, 8, 10 to 16, and additional material specific to certain data structures and algorithms, and of course complexity analysis). Of course, what I propose requires two semesters, but it wouldn't just teach the fundamentals of C++, but rather would use C++ to teach programming methodology, data structures, and algorithms to students with no programming background.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Sorry MutantJohn, you are failing to see the trees among the forest. Yes, C has less material to teach, but oh how much harder it is. How many students are going to scratch their heads when learning pointers? How many students are going to fail writing the linked list? How many are going to double frees, buffer overruns or just allocate something large and hope it works? Are those qualities you'd like to see in real world applications? I for sure as heck am not!

    Yes, C++ is a complex language. So is Java. So is C#. There's no way around that. But you don't have to teach students everything. Instead of spending time to teach them meta template programming, you could spend time on teaching them how to use the standard library effectively to make faster, robuster and more bug free applications. Yay, right? Accelerated C++ is an excellent book that taught us that C++ is not a horrible monster. It can be taught effectively and used effectively, as well. Just take mind at how--and what--you teach.

    Quote Originally Posted by Epy
    Not trolling or anything, but can anyone actually give an example of something done with .NET that isn't total garbage? It doesn't seem that .NET itself is garbage, rather that too many programmers using it produce low quality code. No offense to anyone here, just been my observation so far.
    I could say the same about pretty much any language. 99% of C++ I see here are just students using char arrays and other crap. Everyone seems to think that average Joe can produce a program these days. Well, it's time to wake up, because programming is not trivial, and we shouldn't let average John Doe make our programs. It should be professional programmers (and I don't mean garbage "professional" programmers who were taught to use C in C++ or cheated their way through their programming exam).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Quote Originally Posted by Elysia View Post
    It should be professional programmers (and I don't mean garbage "professional" programmers who were taught to use C in C++ or cheated their way through their programming exam).
    That's debatable. It would highly trend when the program was created and by which people in the team.
    Quite a lot of professional C++ code I have seen does contain C-style syntax, especially string
    manipulation. American Mcgee's "Alice" was built on top of the Quake Engine, and "Madness Returns"
    sampled some of that mixed in with mostly C++.

    The point is - I think that the "vast majority" of professional code will have a hybrid of C/C++ mashed
    together - because that is how they were taught. C then C++ (in the early days). Again, that is not
    the fault of the individual, but may boil down to teaching/learning resources available at the time.
    Double Helix STL

  10. #10
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,616
    Quote Originally Posted by Elysia
    How many students are going to scratch their heads when learning pointers? How many students are going to fail writing the linked list? How many are going to double frees, buffer overruns or just allocate something large and hope it works? Are those qualities you'd like to see in real world applications?
    People who make it into the real world - without understanding pointers or data structures of any kind, beyond arrays - suck. They make ........ty .NET programs.

    The vast majority of students suck at everything, no matter what language it is.

    Quote Originally Posted by Elysia
    Well, it's time to wake up, because programming is not trivial, and we shouldn't let average John Doe make our programs. It should be professional programmers (and I don't mean garbage "professional" programmers who were taught to use C in C++ or cheated their way through their programming exam).
    OK. You stop writing programs first.
    Last edited by whiteflags; 10-04-2016 at 02:48 AM.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by swgh View Post
    That's debatable. It would highly trend when the program was created and by which people in the team.
    Quite a lot of professional C++ code I have seen does contain C-style syntax, especially string
    manipulation. American Mcgee's "Alice" was built on top of the Quake Engine, and "Madness Returns"
    sampled some of that mixed in with mostly C++.

    The point is - I think that the "vast majority" of professional code will have a hybrid of C/C++ mashed
    together - because that is how they were taught. C then C++ (in the early days). Again, that is not
    the fault of the individual, but may boil down to teaching/learning resources available at the time.
    That's what I meant by "garbage professional" programmers. Maybe that's a bit harsh. Maybe they just don't have the education, but the fact remains that those aren't the type of programmers we should have writing our software.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I actually think being a student is the perfect time to scratch your head about pointers and data structures. Implement some primitive data structures in C, gain an appreciation for how awesome the more robust languages are.

    The only thing that I think C does that's abominable is threads. Threads are pretty much one of the reason why I switched to C++ (in addition to the advice from you guys here )

  13. #13
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    What I find interesting is that Java is moving toward an AOT model, while C++ programmers are increasingly embracing the JIT environment of Clang and LLVM.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MutantJohn View Post
    I actually think being a student is the perfect time to scratch your head about pointers and data structures. Implement some primitive data structures in C, gain an appreciation for how awesome the more robust languages are.
    It's one thing to do it when learning data structures. It's another thing completely when learning an introduction to computer science. There's no reason to use C as an introductory language and algorithms and datastructures are language independent, so C holds no advantage here either.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,616
    It's one thing to do it when learning data structures. It's another thing completely when learning an introduction to computer science. There's no reason to use C as an introductory language and algorithms and datastructures are language independent, so C holds no advantage here either.
    What is computer science other than this? I'm sorry but every foray into the computer science department for me was basically learning how to program.

    C does give you a reason to actually implement the data structures though. You might actually learn how they work and use them appropriately in other places, in other languages. Data structures might be language agnostic, but people sure aren't. In C++ for instance the wonder is always "why aren't you using the STL?" Personally I don't think people understand anything until they study it inside and out.
    Last edited by whiteflags; 10-04-2016 at 02:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 03-08-2012, 06:12 PM
  2. my teacher gave it to us....
    By jacek in forum C Programming
    Replies: 3
    Last Post: 01-11-2010, 12:17 PM
  3. Java for real-time applications
    By zacs7 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-26-2008, 06:34 AM
  4. gave it shot...it gave me an error!
    By LonelyPlanderWa in forum C Programming
    Replies: 3
    Last Post: 07-12-2002, 01:26 AM
  5. Please Heelp me ... I gave up
    By NANO in forum C++ Programming
    Replies: 14
    Last Post: 04-21-2002, 08:14 PM

Tags for this Thread