More Reasons I'm Sick and Tired of Java GUIs
out of mem errors on complex GUIs
slow frame repaint in JBuilder IDE
buggy pane repaint in JBuilder IDE
Let's face it, the whole idea of "reading the GUI from the code" is a kluge at best. FAR better that the GUIs be precompiled binaries, as in Delphi and Visual Studio.
ToString Klugy in C#
Basically, Microsoft created the ToString method, then left all the work of implementing it to the developers. It's a method you override in ALL cases, rather than in EXCEPTIONAL cases, as with Java.
This is obviously a time-to-market kluge by Microsoft - they chose not to go through the trouble of writing all those "toString" methods, which require a great deal of detailed programming for some of the more complex classes, and just slugged in the class type. If you want any kind of intelligence from the ToString method, God Bless and good luck, and write it your own damn self.
Here's what ToString does in the two different languages:
Java
Hashtable h = new Hashtable();
h.put("key1","value1");
h.put("key2","value2");
h.put("key3","value3");
System.out.println(h.toString());
Produces: {key1=value1,key2=value2,key3=value3} (the key/values in a string)
C#
Hashtable h = new Hashtable();
h.Add("key1","value1");
h.Add("key2","value2");
h.Add("key3","value3");
Console.WriteLine(h.ToString());
Produces: System.Collections.Hashtable (the type as a string)
1:55:18 AM
|