[Haskell-cafe] Proposal: TypeDirectedNameResolution

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Mon Jul 27 14:09:33 EDT 2009


about qualified imports and TDNR:
for  x.f  to work (as in the proposal),
the name  f  must be in scope (that is, be imported unqualified)?

That would be bad
(unqualified imports should be discouraged).


In Java, the methods of a type are automatically in scope,
e.g., the ".bitCount()" works without any "import":

System.out.println ( java.math.BigInteger.TEN.bitCount() );

see JLS 15.12.1 item 1.3 ("in all other cases...")


J.W.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090727/72bcde62/signature.bin


More information about the Haskell-Cafe mailing list