constructor name clashes

Ben_Yu at asc.aon.com Ben_Yu at asc.aon.com
Wed Oct 8 12:37:40 EDT 2003


Hi, all.

I'm a newbie to Haskell so please bear with me if my questions sound silly.

In coding Haskell, I feel very inconvenient that the name of data
constructors for different types have to be different.

Also, when declaring named fields of a type, such as
data Data1 = Data1{ok1::Bool}
data Data2 = Data2{ok2::Bool}
the field names for different type also have to be unique.

Isn't that annoying? Keeping all the names unique is no easy task in my
opinion. Wouldn't it be nice if we can have something similar to structure
fields in C? Or maybe this is already present and I'm just being ignorant?

I know that we can use modules to introduce name spaces. But still, this is
quite cumbersome.

Thanks!

Ben.



This message is intended only for the addressee and may contain information
that is confidential or privileged. Unauthorized use is strictly prohibited
and may be unlawful. If you are not the intended recipient, or the person
responsible for delivering to the intended recipient, you should not read,
copy, disclose or otherwise use this message, except for the purpose of
delivery to the addressee. If you have received this email in error, please
delete and advise us immediately.




More information about the Haskell mailing list