caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matthew William Cox <matt@mattcox.ca>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [OSR] Exceptionless error management, take 2
Date: Sun, 10 Feb 2008 11:51:32 -0500	[thread overview]
Message-ID: <20080210165132.GA23798@neptune.mattcox.ca> (raw)
In-Reply-To: <200802081907.58290.jon@ffconsultancy.com>

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

On Fri, Feb 08, 2008 at 07:07:58PM +0000, Jon Harrop wrote:
> As Jacques said, polymorphic variants don't define anything, i.e. don't bind 
> identifiers to type constructors. So they can't pollute anything. The "flat 
> namespace" you refer to doesn't exist.

They do exist in a flat namespace, just not a namespace that resides in
the compiler's abstractions. They do live in the programmer's *mind*,
and there it is crucial to keep things unpolluted. The compiler will
always (modulo bugs) keep things perfectly straight and not confuse
itself. Humans will. (Programming) languages are designed to convey
machine instructions meaningfully to humans, so befuddling the poor
human is working against what the language is there do.

As has been pointed out, `Error 1 could have totally different semantic
meanings in a module for parsing XML, and a module for POSIX functions.

No namespace has been `polluted' since `Error is still available for me
to use. That's not the pollution I'm concerned about. The pollution I
care about is the semantic overlap that *I* have to deal with.

> This is the same as strings. You would not discourage the use of "foo" in 
> programs because it "pollutes the flat namespace of strings" for the same 
> reason.

Sure, values can't pollute anything, just like using a lot of 5's
doesn't pollute the integer namespace. On the other hand, raising
Failure "foo" in 50 different functions for as many different reasons
would be semantic pollution.

Cheers,
Matthew

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2008-02-10 16:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 15:01 David Teller
2008-02-07 15:09 ` [Caml-list] " Vincent Hanquez
2008-02-07 16:40   ` David Teller
2008-02-07 15:17 ` Jacques Garrigue
2008-02-07 15:22   ` Jon Harrop
2008-02-08  9:54     ` Vincent Hanquez
2008-02-07 15:52   ` David Teller
2008-02-07 16:06     ` Olivier Andrieu
2008-02-07 16:23       ` David Teller
2008-02-08  9:53   ` Vincent Hanquez
2008-02-08 10:52     ` rlehy
2008-02-08 11:56       ` Vincent Hanquez
2008-02-08 12:40         ` Bünzli Daniel
2008-02-08 15:39           ` David Teller
2008-02-08 17:06             ` Eric Cooper
2008-02-08 20:02               ` David Teller
2008-02-08 19:29             ` Bünzli Daniel
2008-02-08 21:13               ` David Teller
2008-02-10 12:35           ` Vincent Hanquez
2008-02-08 19:07     ` Jon Harrop
2008-02-10 11:58       ` Vincent Hanquez
2008-02-10 16:51       ` Matthew William Cox [this message]
2008-02-07 15:33 ` Jon Harrop
2008-02-07 16:25   ` David Teller
2008-02-07 23:10 ` David Teller
2008-02-10 18:47 ` Yaron Minsky
2008-02-10 22:05   ` David Teller
2008-02-11  2:16     ` Yaron Minsky
2008-02-11  8:45       ` David Teller
2008-02-11 12:12         ` Yaron Minsky
2008-02-11 12:53           ` David Teller
2008-02-11 23:09             ` Yaron Minsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080210165132.GA23798@neptune.mattcox.ca \
    --to=matt@mattcox.ca \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).