Namespace clashes

Mark Carroll
Thu, 16 Aug 2001 01:11:29 -0400 (EDT)

When I used to use Modula-3, I never had to worry about mildly-surprising
namespace clashes. This was for two reasons:

(a) Functions imported from other modules could only be referred to by
    prefixing their name with their module's name.

(b) All system-provided keywords were upper case, and one named variables
    and functions using mixed case or lower case.

When I use Haskell, I'm still tripping over reserved words; lately I tried
to use 'type' as a data field name, for example, and was somewhat
irritated to note that I can't. (Can I?) What gives me the willies is that
a later Haskell might introduce a new keyword or a new Prelude function
that clashes with something I define myself (not that it's that unstable,
I know). Of course, I haven't tried this, but maybe if I always did an
"import qualified Prelude"-type thing, that might mean I was always
definitely safe from at least Prelude extensions though not language
changes, but maybe at the price of my code looking real nasty!

I'm not exactly complaining here; I suppose Lisp had the same problem. I'm
just noting the thought. (-: Overall, I'm quite enjoying playing with

-- Mark