The introductory programming course at uni teaches Java, but you don't have to take it if you know a programming language. Should I teach myself python over the summer (I already know the basics) and avoid having to learn Java? Or are the haters just people who are scared of object orientation.
Runs only on JVM.
Weak.
Incredibly high level where everything takes twenty times the necessary amount to do anything.
Java.
Thread.
Name:
Anonymous2009-03-03 12:20
>>40
>Runs everywhere Sun bothers to port it's JVM
>Shits 50 page long stack traces on error
>EVERYTHING IS AN OBJECT WOOO except the primitives
>Java.
>Thread.
Fixed.
Name:
Anonymous2009-03-03 12:52
>>41 >>42
>It's open source. Everything can be ported to everywhere.
>Exception and assertions everywhere.
>Even the primitives can be made Objects.
>Java.
>Thread.
>>43 >It's open source. Everything can be ported to everywhere.
only if you're willing to rewrite a non-trivial amount of it. >Exception and assertions everywhere.
too bad exceptions are... >Even the primitives can be made Objects.
they can be wrapped in objects. they can't actually be made into objects.
>>40 Runs everywhere.
Java programmer 1: Hey! Did you ever wonder what's... you know... outside the JVM? I mean... where does our Code go when we run our servlets? And what happens to all those nested exceptions when they get handled?
Java programmer 2: There's probably some other, bigger JVM that handles that. The exceptions probably fall off the edge and into that bigger JVM where they're taken care of.
Java programmer 1: And where does that JVM run it's code?
Java programmer 2: It's JVMs all the way down, man. You're worrying too much.
__________________________________
Why do you insist that the human genetic code is "sacred" or "taboo"? It is a chemical process and nothing more. For that matter -we- are chemical processes and nothing more. If you deny yourself a useful tool simply because it reminds you uncomfortably of your mortality, you have uselessly and pointlessly crippled yourself.
1. simple syntax
2. few ugly useless language feature hacks(unlike c#)
3. fast
4. object oriented
5. eclipse
6. runs in browser
7. high level
8. huge well documented api's
9. businesses make decisions on what best meets their needs, not whats cool amongst the kiddies on /prog/
10. /thread
Name:
Anonymous2009-03-04 4:34
>Why people hate Java:
Oh boy this should be fun
>The language sucks. It is not OO as not everything is an >object. int type and Integer object. Shit.
One quirk of the language, all languages have quirks, doesn't affect anything other than making it a little harder to learn, and its already one of the easiest languages to pick up.
>Interface methods must be public. Shit.
No need for private interface methods, perhaps you should learn what polymorphism is and when you should use it.
>Exception handling is a joke. catch can only handle a single >exception type.
Another non-issue from a Microsoft fanboi.
>Empty interfaces uses as annotations.
This isn't a sentence, you fail.
>The JVM is always shit.
Blatantly false.
>It is slow and a resource hog.
False
>Every fucking object as a sync monitor. All of them.
No performance hit for multi-threaded issues unless you specifically request locking/synchronization features.
>Generics are a performance nightmare. The JVM stores all >generic instances as object and boxes/unboxed them when used >instead of just storing them as their type.
Definitely not a nightmare, all handled automatically, the way C# does it causes just as many issues as type-erasure does.
>The JVM and Java language make performance sacrifices to be >forward and backwards compatible. However, most code is >specific to a JVM version anyways because this is done so >poorly.
False, the core syntax of the language has hardly changed at all aside from generics.
>Other JVM languages are a joke, they are only wrappers for >Java and not first class.
Ummm, ok.
>If you want to learn a true OO, garbage collected, cross >platform language/framework stick with .Net.
C# is a java clone that happens to have met with some success because it has Microsoft behind it pushing it. C# is nearly identical to java with the addition of some ugly language hacks.
>Interface methods must be public. Shit.
No need for private interface methods, perhaps you should learn what polymorphism is and when you should use it.
Let me demonstrate why an interface shouldn't be forcibly public.
I'm trying to say that you might want pure virtual functions to be encapsulated. You might only need to use them from within the base class, and you don't want them to be called by a user of your class.
Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing.
Interfaces are supposed to face the public?
Name:
Anonymous2009-03-04 5:43
interfaces,
what are they actually good for?
except ofcourse for reminding you that you need to copy and paste that function code which you are unable to inherit
Name:
Anonymous2009-03-04 6:48
>Oh boy this should be fun
Prepared for ignorant shit.
>One quirk of the language, all languages have quirks, doesn't affect anything other than making it a little harder to learn, and its already one of the easiest languages to pick up.
It's not a fucking quirk faggot. Is is a basic design flaw. Instead of efficient primitive types and OO types, the fags should have made efficient OO types.
>No need for private interface methods, perhaps you should learn what polymorphism is and when you should use it.
Fucking faggot, I never said private shit head. There are other access modifiers.
>Another non-issue from a Microsoft fanboi.
Having to handle every single exception type separately. You are obviously a fag who doesn't understand how to write good code. Only enterprise programmers tolerate no exceptions because their language makes it fucking a waste of time to deal with them.
>Empty interfaces uses as annotations.
>This isn't a sentence, you fail.
You obviously failed CS 101. Example: the serializable interface has no members. It is only there to mark the class as being able to serialize. Serializable isn't really a fucking interface then is it fucktard. The sole purpose is to indicate semantics. Also known as a fuckin annotation. Annotations are annotation and interfaces are interfaces. In Java, interfaces are incorrectly used as annotation. You fail at the basics.
>The JVM is always shit.
Blatantly false.
>No performance hit for multi-threaded issues unless you specifically request locking/synchronization features.
Allocating a large amount of unused resources is a fucking performance hit faggot.
>Definitely not a nightmare, all handled automatically, the way C# does it causes just as many issues as type-erasure does.
What fucking issues are there with "the way C# does it"? There are none. Unlike faggy Java, the code for generics in .Net is loaded only once in to memory. There is no reason to load the same fucking instructions multiple times for multiple instances like Java. The single set of instructions will work on all fucking instances. Java loads the same instructions for each instance and then adds its own faggy boxing instructions on top of that. C++'s stupid macro templates are even better than Java's awful way of doing this.
>False, the core syntax of the language has hardly changed at all aside from generics.
I didn't say shit about the faggy Java syntax.
>Ummm, ok.
Multiple dispatch, you have no idea what the fuck it is or why it is so fucking terrible that Java only has single dispatch.
>C# is a java clone that happens to have met with some success because it has Microsoft behind it pushing it. C# is nearly identical to java with the addition of some ugly language hacks.
J# is the Java clone, and it fixes Java by removing tons of depreciated shit and adding features the JVM will never cope with. C# is just what Java wishes it was. But C# is shit because C syntax is fundamentally shit.
Name:
Anonymous2009-03-04 10:04
>>73
And you obviously don't understand strong typing.
Name:
Anonymous2009-03-04 10:10
I'll bet you a dollar that there are at least 3 older threads exactly like this one around /prog/.
Name:
Anonymous2009-03-04 14:13
>>60
I like a man that backs up his statements with benchmarks, research and studies and avoids anecdotes or hearsay.
Oh wait...
Name:
Anonymous2009-03-04 15:58
>It's not a fucking quirk faggot. Is is a basic design flaw. Instead of efficient primitive types and OO types, the fags should have made efficient OO types.
1) If you are so concerned about efficiency you better start coding in C, I think you forget that there is a fucking VM between your code and the CPU. The more you whine about inefficiencies I can tell that you are coding in the wrong language, no interpreted language will ever be as fast as native, and making pointless changes to the language just so it goes .1% faster is dumb. Future versions could easily just auto-wrap primitives for you where needed, except that they won't because nobody gives a shit since they already have auto-unboxing.
>Fucking faggot, I never said private shit head. There are other access modifiers.
Look up interface in the dictionary.
>Having to handle every single exception type separately. You are obviously a fag who doesn't understand how to write good code. Only enterprise programmers tolerate no exceptions because their language makes it fucking a waste of time to deal with them.
try{ //blah}
catch(Exception ex){};
Or nest them, lets see so this C# language hack saves you 5 characters, nice. Exceptions aren't as common as you seem to think they are that this is an issue.
>You obviously failed CS 101. Example: the serializable interface has no members. It is only there to mark the class as being able to serialize. Serializable isn't really a fucking interface then is it fucktard. The sole purpose is to indicate semantics. Also known as a fuckin annotation. Annotations are annotation and interfaces are interfaces. In Java, interfaces are incorrectly used as annotation. You fail at the basics.
Who fucking cares? Using interfaces as annotations is rare.
>Allocating a large amount of unused resources is a fucking performance hit faggot.
not large. Can i remind you that you are coding for a fucking VM? Please code in C if you have so many issues with this.
>What fucking issues are there with "the way C# does it"?
They made all C# 1.0 and 1.1 code break. The only reason they could do this is because nobody actually codes in C#. Java generics use less memory than C# and have a small performance hit. k.
>Multiple dispatch, you have no idea what the fuck it is or why it is so fucking terrible that Java only has single dispatch.
"Multiple Dispatch" lends itself to ugly code. Just like your ugly parents lent themselves to an ugly baby. Using code logic based on the run time type is ugly and bad.
>J# is the Java clone, and it fixes Java by removing tons of depreciated shit and adding features the JVM will never cope with. C# is just what Java wishes it was. But C# is shit because C syntax is fundamentally shit.
J# was MS's attempt to embrace and extend and extinguish java. Then they realized people weren't going to fall for that shit again, and Sun's java was succeeding. So they made C# calling it the new hotness and totally unlike java, even though its syntax is laughably identical to java's, even though they keep and throwout the same exact features of C that java did, even though Microsoft makes inferior clones of hundreds of products. Retarded faggots like you STILL bought into the kool-aid and are preaching .NET
>>77
Java generics are shit because they exist only in the Java language and not the JVM. When Microsoft added generics to .NET, they kept the old, non-generic collections exactly as they were, but then added new, generic versions in a separate namespace. That means that old code could be recompiled on .NET 2.0. Why couldn't Java have done that?
>>60 C# is nearly identical to java with the addition of some ugly language hacks.
Ugly language hacks? Like what? Delegates and events? Lambdas? LINQ? Closures? None of those look ugly to me.
using System;
using System.Collections.Generic;
using System.Linq;
static class Beautiful
{
// A simple example of a closure. Makes use of delegates
// and lambdas.
public static Func<int> MakeCounter(int i)
{
return () => i++;
}
public static void Main(string[] args)
{
// type inference lessens the need to type redundent code like
// List<int> list = new List<int>();
var c = MakeCounter(0);
var list = new List<int>();
for(int i = 0; i < 50; ++i)
list.Add(c());
// A simple LINQ expression. Could also write as:
// var evens = from i in list where i % 2 == 0 select i;
var evens = list.Where(i => i % 2 == 0);
foreach(var even in evens)
Console.WriteLine(even);
}
}
Name:
Anonymous2009-03-04 16:44
>>35
>I'll be out in the real world designing scalable turnkey solutions for enterprises and getting laid on weekends.