Hacker News new | ask | show | jobs
by b15h0p 2407 days ago
The checker framework (https://checkerframework.org/) can make the compiler understand about stuff like this without introducing additional types in Java.

I have never tried it myself, maybe someone with experience can chime in?

1 comments

I was a PhD student in the group that makes on the Checker Framework.

It's actually pretty easy to use it to automatically enforce Hungarian notation. I have a blog post/sample implementation here: https://toddschiller.com/java-hungarian-notation-checker.htm...