[Haskell-cafe] about import alias
marcin.kosiba at gmail.com
Sat Apr 4 11:42:48 EDT 2009
On Saturday 04 April 2009, Manlio Perillo wrote:
> Haskell 98 allows import alias:
> import qualified VeryLongModuleName as C
> however it does not allow aliasing for imported names
> import NormalModule (veryLongFunctionName as C)
> what is the rational?
> IMHO this can be very useful in some cases.
While I do agree with the argument that it could be useful in some cases,
misuse of this feature would cause a lot of confusion, consider:
from System.IO.Unsafe import (unsafePerformIO as safe)
I think that the alias feature is OK, when the namespace is long,
longfunctionnameswhichareapaintoreadandespeciallywrite are a bug and should
be treated and fixed by the owner of that code, not by the user.
If very function names are that much of a problem to you consider a wrapper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090404/0a390f79/attachment.bin
More information about the Haskell-Cafe