I am not a C++/Template god like many of the/.ers are,,, but if I recall correctly, once you set the type for the templated class, that entire class can only accept that one type.
I have constant need in Java to store all kinds of objects in Hashmaps. Templates would get in the way big time for me.
I loved the way the hard-drive based Sonic players connected to your PC without the need for special drivers. Your PC just saw the Sonic device as another hard drive.
That said, I could not buy one of their players because they would not support WMA files. Over 5gb of my collection is in that format.
I was forced to go the Creative Labs route with their Nomad Jukebox 3 (Which I got with a 40gb hard drive,,,,,, smooooooooooooth).
This ultimately comes down to a decision of *when* do you want to handle the "type" issue.
In Templates, you decide up front.
In Java, you handle the decision when you actually use the java.lang.Object object. In your example, adding the simple "if" check with the code ".getClass().getName().toLowerCase()" to determine you're truly using an Integer would eliminate any runtime errors whatsoever.
I have never had a Java runtime error over typecasting issues. If something unexpected is in the Container, I throw an exception or bypass the value entirely. There is no excuse for having a typecasting issue in Java when you can check the object's type.
A post like your's is the reason I posted. I wanted to see some varying opinions on the subjects. Thanks for falling into my trap. LOL!
1) Why do you find Java's object model annoying/ugly?
2) Why in the world would a group of Java programmers want Templates added to the language? It's easy to find out what Class an object is in Java. I never have typecasting issues.
The only place I ever saw a good use for Templates is in the C++ Container Classes and that woudn't be necessary if all C++ objects were inherited from one object like Java's objects are.
Templates only seem to be a necessary evil in OO languages that don't ultimately inherit all objects from one object.
LOL! I realized that when I wrote the comment. Notice the ";-)" you quoted above.
I know what's happening with the savings.;-)
Still, back to the original point, it's unbelievable how much they charge for Websphere Advanced. I know of two shops with 10+ developers that went the Java route but didn't go the J2EE route because of the price of the J2EE compliant servers. They just could not afford it.
I think your point is spot-on. I've read that as well.
I was talking to someone today about Sun's sad stock price and commented that it is a shame there isn't a small royality they make on Java period. Just a tiny one would help Sun tremendously.
The connection is that IBM charges an arm and a leg for Websphere Advanced and I was making a humorous connection between that and the savings they are making with many of their jobs being shipped to India.
Get it now? You can laugh at this point too. If you want to know when to breath in and exhale, just let me know that as well.
Uhhh, have you heard of.Net? It's popular with many shops because of the lower cost of entrance.
The cost of a J2EE Container is a big obstacle for many shops.
I'm surprised that Sun put any kind of a negative spin at all on this. An Open Source J2EE compliant Container would be a Cruise Missile right into the Microsoft camp.
It's un-friggin ridiculous how damn much IBM, et all, wants for a J2EE compliant server. Honestly, it's outrageous for small companies and your partners you want to deploy to.
Honestly, I'm surprised IBM charges as much as they do with all the payroll savings they now have from sending jobs over to India. Where are the savings going?;-)
Gee, I thought the conscience God gave everyone would work just as well.
I could never believe that the Board of Directors at Sun didn't have any pangs of conscience when they knowingly let all those people go.
God help us but I may have to agree.:-(
I've got a good idea! Perhaps the government course in Business Ethics could be taught by none other than Bill Clinton. Attendees would have to go through the entire class just like the teacher - with their pants down around their ankles.
ROFLMAO!!!!!!!!!!!!!!!!!!!!!!!!
I am not a C++/Template god like many of the /.ers are,,, but if I recall correctly, once you set the type for the templated class, that entire class can only accept that one type.
I have constant need in Java to store all kinds of objects in Hashmaps. Templates would get in the way big time for me.
I loved the way the hard-drive based Sonic players connected to your PC without the need for special drivers. Your PC just saw the Sonic device as another hard drive.
That said, I could not buy one of their players because they would not support WMA files. Over 5gb of my collection is in that format.
I was forced to go the Creative Labs route with their Nomad Jukebox 3 (Which I got with a 40gb hard drive,,,,,, smooooooooooooth).
Thanks for the link. Please understand that I'm not refuting their decision to request Templates, I'm just wondering why they want it.
I'll study the link you provided.
Peace.
This ultimately comes down to a decision of *when* do you want to handle the "type" issue.
In Templates, you decide up front.
In Java, you handle the decision when you actually use the java.lang.Object object. In your example, adding the simple "if" check with the code ".getClass().getName().toLowerCase()" to determine you're truly using an Integer would eliminate any runtime errors whatsoever.
I have never had a Java runtime error over typecasting issues. If something unexpected is in the Container, I throw an exception or bypass the value entirely. There is no excuse for having a typecasting issue in Java when you can check the object's type.
A post like your's is the reason I posted. I wanted to see some varying opinions on the subjects. Thanks for falling into my trap. LOL!
1) Why do you find Java's object model annoying/ugly?
2) Why in the world would a group of Java programmers want Templates added to the language? It's easy to find out what Class an object is in Java. I never have typecasting issues.
I'm real, real happy with Fastmail's (http://www.fastmail.fm) ability to send Spam to a "junk" folder with SpamAssasin's help.
Honestly, Spam isn't an issue for me.
The only place I ever saw a good use for Templates is in the C++ Container Classes and that woudn't be necessary if all C++ objects were inherited from one object like Java's objects are.
Templates only seem to be a necessary evil in OO languages that don't ultimately inherit all objects from one object.
Haaaaaaaahahahaha!!!
Did you notice the "ROFL!!!!!" part of the post????? I *realize* it was a joke. Try reading before making a fool of yourself.
Bingo. Bingo. Bingo.
LOL! I realized that when I wrote the comment. Notice the ";-)" you quoted above. I know what's happening with the savings. ;-)
Still, back to the original point, it's unbelievable how much they charge for Websphere Advanced. I know of two shops with 10+ developers that went the Java route but didn't go the J2EE route because of the price of the J2EE compliant servers. They just could not afford it.
"...you dumb cunt". Oh yeah, you're the pinnacle of pure breeding. Your true colors are showing through.
I think your point is spot-on. I've read that as well. I was talking to someone today about Sun's sad stock price and commented that it is a shame there isn't a small royality they make on Java period. Just a tiny one would help Sun tremendously.
The connection is that IBM charges an arm and a leg for Websphere Advanced and I was making a humorous connection between that and the savings they are making with many of their jobs being shipped to India. Get it now? You can laugh at this point too. If you want to know when to breath in and exhale, just let me know that as well.
Uhhh, have you heard of .Net? It's popular with many shops because of the lower cost of entrance.
The cost of a J2EE Container is a big obstacle for many shops.
You're just jealous your posts don't capture as many eyeballs as mine do. ;-)
ROFL!!!!!!! Interesting inference. Sounds like they dissed themselves on that one. LOL!!!!!
I'm surprised that Sun put any kind of a negative spin at all on this. An Open Source J2EE compliant Container would be a Cruise Missile right into the Microsoft camp. It's un-friggin ridiculous how damn much IBM, et all, wants for a J2EE compliant server. Honestly, it's outrageous for small companies and your partners you want to deploy to. Honestly, I'm surprised IBM charges as much as they do with all the payroll savings they now have from sending jobs over to India. Where are the savings going? ;-)
ROFLMAO!!
Haaaaaaaaaaaaaaaaaaahahahahahahahaahahahahahaha!!! !!!
The person who invented the Internet should join the company that invented the GUI.
Bingo. Bingo. Bingo.
Gee, I thought the conscience God gave everyone would work just as well. I could never believe that the Board of Directors at Sun didn't have any pangs of conscience when they knowingly let all those people go.
God help us but I may have to agree. :-(
I've got a good idea! Perhaps the government course in Business Ethics could be taught by none other than Bill Clinton. Attendees would have to go through the entire class just like the teacher - with their pants down around their ankles.
ROFLMAO!!!!!!!!!!!!!!!!!!!!!!!!
Should be "I'm now in favor..."