Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C# and Java faggotry

Name: EleoChan 2006-02-20 13:49

So originally I learned Java but then, after downloading Visual Studio 2005 and seeing how it (truly) is the best IDE ever, I said fuck this, why use Java; C# is 90% the same and has a better IDE.

C# code is easier to work with than Java.  One glaring example is ArrayLists.  Last I checked you could not create an array in Java without specifying the size, so you have to use Vectors or ArrayLists (or hashes, I heard, but I've actually never worked with them yet).

So where in C# I can do:

ArrayList nonsense = new ArrayList();
nonsense.Add("Cheesecake");
nonsense.Add(2);

String food = nonsense[0].ToString();
int number = nonsense[1];

This is perfectly valid.  Java on the other hand returns just plain Objects, no matter what type you added.  I can do nonsense.toString(); in Java to return a string, but I actually can't get an int back without a lot of tacky code (I have to turn the Object into a string, parse the string as an integer).  So when I create an ArrayList, I have to specify what values I'm adding to it:

ArrayList<Integer> nonsense = new Arraylist<Integer>();

nonsense.add(4);
nonsense.add(8);

int numberA = nonsense.get(0);
int numberB = nonsense.get(1);

So long, versatility.  Is it tacky enough yet?  Not nearly enough!  In C# I could:

foreach (nonsensery in nonsense) {
  //do something
}

I cannot do this in Java (well, not as easily) because it is gay.  I have to use regular old for() loops.

Also, creating Windows forms is 1000x easier than Java's Swing.  I have a massive book on Swing; I haven't even read it because Swing is too intricate to try to just memorize.  You'd think intricacy would be a good thing, but in Java it just seems to be useless.  It's almost like it started as something simple and people kept slapping things onto it, making it bulky and hard to work with.

The one reason I probably won't ever use C# again is because it claims to be platform independent but is only so in theory, and because you have to have the .NET framework installed to run shit.  This makes it difficult to let other people use your programs, especially since .NET is just an optional download on Windows Update.  A lot of people don't have the .NET framework installed, and NO ONE wants to have to work to install something.  This is as bad when VB programs wouldn't run out of the box and you had to download a dozen gay little files and put them in your Windows/System directory to even run shit people coded in VB.

Java programs require a virtual machine, yeah, but most people have one installed just becuase they need it at some point while browsing the internet.

The truth is I actually like the way C# works and the way it reads, and Visual Studio made it really fun to code with it.  If it would just compile to a standalone .exe, I'd be hapy.

I've thought, at this point, of just going the C++ route.  I have every intention to learn C++ eventually, I actually started with C++ when I was about 13 but couldn't quite get my head around it at that age.

Name: Anonymous 2006-03-03 6:30

hmm.
I have programmed in most of the languages that have been around in the last 15 years, including some in-house garbage ones, and the reasons you hate Java make absolutely no sense.

Firstly you should hate Java because it ALLOWS primitive types, thus breaking the object oriented rationale.

This flaw leads to the kind of sloppy thinking, and programming, where you believe that diversely typed objects should reside in the same array!

What you are advocating is dangerous and stupid, and something that should be taught in OOP 101.

The way that C# ArrayLists work are identical, under-the-hood, to Java ArrayLists. It is just that the extra code you as a programmer have to write in Java is automatically generated by the C# compiler. You do not store an actual primative in the C# array, but its corresponding wrapper class.

All that aside, what you seem to want is an object oriented way of handling sequential programming like data constructs.

In OOP instead of using arrays and collections of diverse types you create composite classes that contain all the data you want to store. [And any methods you want to perform on said data].

A good, and simple, design pattern for this kind of construct is the ValueObject from Design Patterns by the GoF. [A book you desperately need to read if you intend to keep programming in an OOP language, even though the language used by this book is rather arcane.]

Also the performance issues and, ahem, gayness of Java have been all but solved in 1.5. [Most of the performance issues were solved back in 1.4.2, but what the hey]

I make my living developing Enterprise Solutions in Java [which sucks big time until J2EE 1.5 finally rolls-out! Bloody EJB inteface soup!] but I am a Python and PHP hacker in my spare time.

I would recommend you have a good look at Python as a language for you.
You obviously don't 'get' OOP methodology and the flexibility  and rapid development environment of Python might just suit your personality.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List