Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment I left Java 8 year ago and never looked back (Score 4, Interesting) 75

In Java, in addition to writing a functional program, you have to build an extensive type system. That's half the work, and yet it's not really programming... it's documentation and runtime error prevention.

Same thing is going on right now with TypeScript. Are custom types worth the bother? I'm on the fence. For quick and dirty stuff, types get in the way. For more complex applications, types can be very very useful (and also have a very very difficult inheritance chain to follow). Thats why, when programming in Java, you really need an IDE to do the bookkeeping for you.

(I really liked Groovy, where I could mix and match typed and untyped approaches within the same application. Too bad about all that reflection though.)

Comment Seen both sides (Score 1) 782

I was a long time C++/Java/Groovy programmer, who by circumstance wound up writing JavaScript for browsers and NodeJS.

When I'm not forced to use objects, I tend not to use them except where abstraction/encapsulation simplifies maintenance. Looking back on it now, there was a huge amount of time wasted in designing and maintaining types and interfaces, and refactoring of same.

Generics in Java are/were a disaster: I have seen casts used to break the declarations, because the declarations were wrong. And it was all to solve the RARE problem of inserting/reading the wrong type from a collection!

Types are not so important that you need to be forced to use them. Sometimes a little slop in the system is allowable, depending on whether you're writing website code or financial.

Slashdot Top Deals

Waste not, get your budget cut next year.

Working...