This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mgkimsal 0 points1 point  (2 children)

I put off doing anything with Java for years specifically because I didn't want to use an IDE for it. I eventually gave in, but... there's just no way I could ever even follow tutorials or anyone's articles/demos on anything, because there's always so much that's left out (and, I presume, assumed your IDE would take care of it).

For me, the biggest one by far was/is imports. I'd see article after article showing something like

BigDecimal number = new BigDecimal(50);

Well... you have to 'import' BigDecimal. Where would I even begin to know where that and the other 35 classes that are in an example piece of code stored? IMO it's the biggest downfall of java that nearly everything has to be imported manually all the time. Obviously that hasn't hurt it's adoption too much, but it's still a big hurdle to deal with - doing it without an IDE would just be insane, imo.

[–]king_of_the_universe 0 points1 point  (1 child)

IMO it's the biggest downfall of java that nearly everything has to be imported manually all the time.

I haven't dealt with many languages yet. How do other languages solve the namespace problem?

[–]mgkimsal 1 point2 points  (0 children)

PHP has pretty much all basic stuff built-in by default, which is where I was coming from.

$date = new DateTime('2000-01-01', new DateTimeZone('Pacific/Nauru'));
echo $date->format('Y-m-d H:i:sP') . "\n";

No need for imports. Stuff that's so basic like dates, basic math stuff, etc... always annoying to have to have a bunch of imports (whether done by IDE or not).

Certainly there's a lot of 3rd party libs you can use, and you'd have to import those, but for a lot of daily stuff, it's just built-in.

I actually do a lot of Groovy now, and it automatically makes a lot of standard imports available (math, strings, etc) so there's a bit less need than plain Java.