From: Robert C Fischer <robert@fischerventure.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: let int = ?([' ' '\t'] '-') digits+
Date: Fri, 29 Jun 2007 13:11:23 -0500 [thread overview]
Message-ID: <46854B4B.2060003@fischerventure.com> (raw)
In-Reply-To: <jwvzm2i7in5.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org>
Syntax polymorphism violates the principle of least surprise. It is,
indeed, Teh Eevil.
~~ Robert.
Stefan Monnier wrote:
>> Is this a good idea?
>>
>
> Don't think so: it doesn't help the case where you want to use negation on
> a variable rather than a constant, so it introduces a fairly
> subtle inconsistency which doesn't seem to be worth the trouble.
>
> I guess in Haskell you could use type class trickery so that
>
> "f - 3" substracts 3 from f if f is numeric and passes -3 to f if f is
> a function (I leave the case where f is both a function and a member of
> the Number class as an exercise to the user).
>
> that would be even more evil,
>
>
> Stefan
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
next prev parent reply other threads:[~2007-06-29 18:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 15:39 Jon Harrop
2007-06-29 15:56 ` [Caml-list] " Robert C Fischer
2007-06-29 16:32 ` Brian Hurt
2007-06-29 16:40 ` Jon Harrop
2007-06-29 18:21 ` Philippe Wang
2007-06-29 15:57 ` pzimmer
2007-06-29 16:35 ` Robert C Fischer
2007-06-29 16:41 ` Jon Harrop
2007-06-29 17:57 ` Stefan Monnier
2007-06-29 18:11 ` Robert C Fischer [this message]
2007-06-29 21:05 ` [Caml-list] " Jon Harrop
2007-06-29 18:29 ` [Caml-list] " skaller
2007-06-29 18:53 ` Pal-Kristian Engstad
2007-06-29 19:21 ` Daniel Bünzli
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=46854B4B.2060003@fischerventure.com \
--to=robert@fischerventure.com \
--cc=caml-list@yquem.inria.fr \
--cc=robert.fischer@SmokejumperIT.com \
/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