Environment variables are the bane of my existence 
-
-
-
Coeffects? I mean some programs wouldn't have environment variables (eg. targeting HaLVM/MirageOS).
- Show replies
New conversation -
-
-
Yeah, agree. I think of main() as part of the runtime. All it does is gather all the environmental bits that it needs to construct and execute the "real" program
-
I like to think of it as "the end of the world" as so many FP folk like to put it
End of conversation
New conversation -
-
-
Isn't your program just side effecting? Isn't it?

-
Well, that main method is never going to be pure, but I think it's useful to be closer to purity. It should also return an exit-status integer!
- Show replies
New conversation -
-
-
You could roll that env thing yourself a bit like the scalaz SafeApp thingie?
-
Yes, I'm considering it! Different implementations could be provided for different runtimes (well, Scala.js) but I think it would just be convention that stops people accessing environment variables through System.getenv. Or maybe a SecurityManager could help?
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.