Yes, but the only reason that people could stay away from assembly language was that compilers were made that could optimize code as well as an assembly language programmer in most cases. Also, C has several ways to provide directions to the compiler on how you want something compiled. Java needs this sort of functionality as well, at least down to the same level of abstraction as C++, such as being able to create pointers if it is important to save time from garbage collection.
As for speed, despite the advances in processor technology, there is no shortage of speed critical applications. Database software and web servers are a couple examples.
Certainly there are now and always will be programming situations that require the kind of speed that comes only from low level programming that’s directly involved with the hardware: real-time 3D, databases, etc. There’s a lot more programming situations now, though, that simply don’t; web/application servers, text editors, distributed clients, to name a few.
I’m not suggesting that Java or its like will replace hand-coded assembly. I’m suggesting that as hardware gets better and the realm of programming tasks grows, higher level languages will always come that leave more to the computer and concentrate less on perfect machine language than on programmer productivity and project scale.
Don’t worry; we have a nice home for you, where they serve jello every Tuesday, and play Bingo once a week.
In which case, you are agreeing with what I’ve posted, except that I think the speed issue will need to be addressed, rather than just become irrelevant. How often in C does one need to specify which vaariables require a register? Not often, but it’s a tool that the programmer can use to optimize aspects of their code that might be missed by the compiler. I’d imagine that such things were even more commonly used when compilers weren’t as good at optimizing as they are now.
I’m only 23. Just that my college seems to require C programming for a number of classes (after teaching us C++, which seems kind of backwards). Apparently, C is still pretty common among Unix programmers. Great, an now I’m having flashbacks to Lex and Yacc (OK, Flex and Bison, really).
I’m saying that in a lot of cases, the speed issue will be irrelevant, as far as optimizing beyond what the language already allows. An example: I’m using Windows 2000, IIS, and Resin for an applications server at work, and have started working on fairly extensive intranet that’s expected to take a lot of the load off the database (where a lot of business logic is coded as stored procedures). I could get down in the dirt with C/C++ and write a middle tier that would blaze, but it wouldn’t be economical when I can code it faster in Java, and as language based performance barriers come up, I’ll add hardware to stay ahead. Ultimately, that’s cheaper and faster, and it’s an appropriate solution in my problem domain (but not necessarily in others). As hardware improves, this sort of rationalization becomes more appropriate for more scenarios, not less.
You may be only 23, but you already sound like an old coot
I used to be a die-hard C/C++ advocate until I learned Java two years ago – and now, I have to admit, it’s my language of choice (though not at the moment, but that’s a separate issue all together). C/C++, though great, really does feel like it’s cobbled together, while Java is clearly designed from the ground up to be a uniform and consistent object-oriented language.
(“C++ is C with object-oriented bits bolted on” --Attribution unknown, but accurate )
Performance can be a problem depending on the application, but I hear there are platform-specific compilers that will compile Java code for the target system you want to run on.
And hey, if Java pisses off Bill Gates, that’s another reason to use it!
We have Visual Studio here at work and I think it has Visual J++ or some shit on it. That may be able to complile machine-specific code. I’ll take a look at it later and see.
Does anyone have any solid ideas on why XP isn’t supposed to include Java support? I’ve been a stout Microsoft supporter for some time, but now they’ve even managed to piss me off.
VJ++ compiles Windows specific java libraries to java bytecode, not to machine language. The windows specific libraries add some speed by making OS calls. The only compiler of which I’m aware that compiles directly to machine language is GCJ, the GCC Java compiler.
Microsoft lost it’s lawsuit with Sun over their infringement of the Java trademark (by putting those windows-specific libraries in place, and by continually failing Sun’s Java compliance tests). The court said “Bill, you can’t ship modified, windows-only Java and still call it Java”. Bill replied “then I won’t ship Java at all. I’ll invent C# to replace Java, and make that the foundation of .NET”
I can’t believe that Sun didn’t see this coming… I don’t know why Sun didn’t make a deal with MS to say that they could call it Java as long as it passed the compliance tests. It would be no different than VC++ supporting standard C++, as well as MS specific libraries.
Except that Java is supposed to be machine dependent. Why turn Java into a complicated JavaScript, where some shit is supported on some systems and not on others?
Now I really am pissed at Microsoft. Looks like its time to learn Linux. :eek:
I think you mean that it is the GNU Java compiler. GCC is the GNU C compiler.
And yeah, I’ve generally been a Microsoft supporter (in that I feel they have generally been in the right, not that I particularly like their software), disagree with how they tried to corrupt Java, which was Sun’s property. As for why they didn’t let Microsoft use the name Java, I’d guess it’s because they don’t think Microsoft can come up with anything better. Especially because Microsoft is unlikely to make anything that works well on other systems.
I take you to mean “machine independent”, and yes, it’s supposed to be. That’s the point: you could write standard Java that would run on a Sun-compliant vm, which any vm called a “Java VM” would have to be. If you wanted to write Windows specific Java, you could do so, and you wouldn’t be able to call it Java.
At least then, Java would still be standard on 90% of the desktops in the world. It wouldn’t be ideal, but Java would have bigger distribution than it will in two years.
They sued Microsoft to prevent them from using the Java trademark because use of that trademark entailed compliance with the standard promulgated by Sun. Aside from the Windows specific libraries, Microsoft was… lax in fully supporting the standard, which denied them the right to use the trademark.
More conspiracy minded programmers will say that MS deliberately sabotaged their VM support to push programmers away from Sun-standard Java, towards MS Java. I tend to believe that, given their history of deliberately breaking products from DR-DOS on.
Dunno what this matters much, but the game programming forums I breeze through now and then, MS VC++ is #1, Borland C/++ is #2 and Java is somewhere after that, maybe three, I don’t know. The C’s have other advantages also but even so, Java’s main problem is that comparatively it’s so slow.
J++ had some good points, one being the VB-style GUI layout (much better than the real Java—I never understood why everybody just didn’t use X-Y coordinates as a percentage of the screen dimensions, but anyway,). Even fully “updated” though, J++ would hang many PC’s a lot- especially when you’d run a program “in” the IDE. My own home PC did this, as did many different PC’s/several OS’s at the college I was attending at the time.
I thought I saw some PC/chip maker mentioning Java chips in the next year or two… -can’t remember where though.
I would be willing to learn and use C#, but I refuse to spend my own money on it. The company can pay for that one. - MC