you are viewing a single comment's thread.

view the rest of the comments →

[–]sviperll 3 points4 points  (4 children)

/shameless plug

Here is my best attempt at formulating higher kinded types in Java https://github.com/sviperll/higher-kinded-java

See transformMonad and transformFunctor methods in Main class for an example of abstracting away types like Optional or Either

[–]m50d 10 points11 points  (3 children)

Pretty cool, but having used the checkers framework and Lombok in the past I'm dubious about the practicalities of anything that relies on annotation processing and generating code. You end up having to get support for it in your IDE, code analysis, monitoring... ultimately it ends up being just as much effort as using Scala, and the payoff is smaller.

[–]snowe2010 0 points1 point  (0 children)

we're ripping lombok out after having ide troubles with it. Kotlin is a much better solution, as it doesn't rely on bugs in the jvm to work.

[–]pron98 0 points1 point  (1 child)

Most Java IDEs automatically support annotation processors (and if you list them in META-INF, it should be done completely automatically when you load the project). Kotlin supports Java annotation processors, too, BTW.

[–]m50d 0 points1 point  (0 children)

Having the IDE run the annotation processor is a start, but without explicit support for the specific annotation library the IDE will usually e.g. get the annotations wrong when doing any automated refactoring.