r/programming • u/knife_sharpener • Feb 22 '15
Java Makes Programmers Want To Do Absolutely Anything Else With Their Time
http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35
Upvotes
2
u/yogthos Feb 22 '15 edited Feb 22 '15
Using macros is generally discouraged and vast majority of problems can be solved with regular functions. Beginners often get overexcited about using macros and that's a mistake in my opinion. Macros are a useful tool, but that's really not the main appeal of Clojure. If you look at popular Clojure libraries in the wild you'll see that there are very few macros in them. As the style guide says: don't write a macro if function will do.
One of the main benefits I see using Clojure over Java is actually how rare null pointers happen, typically when doing Java interop. Since all the standard library functions handle nil values intelligently, they simply bubble up to the top in most cases. Instead of having to pepper null pointer checks all over the place, you can simply check for a value at the end of the transformation.
Again, I'm not sure what you mean by "fix the compiler". The compiler works exactly as it's supposed to, but you have to understand the intricacies of the language in order to use the most advanced features.
Macros require you to understand the details of how the reader and the evaluator work, what macro expansion is, when it happens, how macros interact with one another and so on. It's hands down the most complex feature of the language and I definitely would not recommend focusing on it as a beginner.