Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`defonce` unfortunately doesn’t help. Without restarting the JVM I can overwrite that var. And that is okay, because defonce is just a protection mechanism, to not delete data when a namespace is repeatedly reloaded. This reloading occurs 99% at development time. Useful tool.

But I would like to have real constants. A final class with a static final field (and potentially type information), or something like that. This would give the optimal lookup time, as the JVM would have the direct address.

When I (defonce x 1) I can still (def x 2), without restarting the JVM. I want this to not be possible with a defconstant.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: