Hacker News new | ask | show | jobs
by tzs 5059 days ago
I know this is blasphemy in the Java world, but I'd probably use a preprocessor to transform some clean syntax into the normal Java code. I'd rather have the slight increase in build complexity over the potential issues with the extra classes and the breaking of assumption about how things compare and such.
4 comments

Your IDE would complain all the time. Seriously, you lose one of a few good parts, stellar IDE support. Why bother with Java then?
Something like Xtend ( http://www.eclipse.org/xtend/ ) ?
Never heard of this. Thanks
I have always been extremely tempted to just throw together a quick and dirty preprocessor in maybe Awk for the few personal projects that I've used Java for. It would just make everything so much nicer.
> I'd probably use a preprocessor to transform some clean syntax into the normal Java code.

If I were in your place, I'd just learn enough Java to be proficient. Java is a very powerful language and certainly better suited for mundane tasks than your preprocessor.

I think you misunderstood; he wants to avoid doing mundane tasks.

There's a couple of extensible preprocessors that aim to do exactly this. They're called 'clojure', 'scala', and 'kawa'.