
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
They [Java] don't have local types. They have inner classes, and objects get passed.
The net effect is that I can make an inner class that implements some interface, and in the implementation I can refer to things defined in some enclosing scope (not just in the global scope). Sure, I can only refer to static things, but in Haskell everything is static, no?
Newtypes do work.
I agree, to some extent. Using a newtype to simulate the above is like lambda-lifting: you have to add the information on the local things you want to use. The Java compiler does that for you. Best regards, J.W. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkiS8v4ACgkQDqiTJ5Q4dm+rvwCeN+R7aRh4EwBXIKlf3Mhc9nc5 wRAAoKc+SlkCkEaybN6jIBHDSTu8J/yC =8Ndx -----END PGP SIGNATURE-----