caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: samsaga2 <samsaga2@stratos-ad.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] OCaml wishlist -> my wish
Date: Wed, 22 Oct 2003 12:52:01 +0200	[thread overview]
Message-ID: <3F966151.7080306@stratos-ad.com> (raw)
In-Reply-To: <20031022101438T.garrigue@kurims.kyoto-u.ac.jp>

It could be well that:

    let hello name = Printf.printf "Hello %s\n" name in
    let nooverride hello number = Printf.printf "You're only a number 
%d!!\n" number in
    hello "samsaga2";
    hello 666

And the output will be:

    Hello samsaga2
    You're only a number 666!!

nooverride label it's optional

Then functions as (+) and (+.) could be:

    let (+) number1 number2 = number1 + number2 in
    let nooverride (+) number1 number2 = number1 +. number2

even

    type vector3 = { x : float; y : float; z : float }
    let nooverride (+) v1 v2 = { x = v1.x + v2.x; y = v1.y + v2.y; z = 
v1.z + v2.z }

But... it's only a wish :-P


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-10-22 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 22:34 [Caml-list] OCaml wishlist Richard Jones
2003-10-22  1:14 ` Jacques Garrigue
2003-10-22 10:52   ` samsaga2 [this message]
2003-10-22 13:21   ` brogoff
2003-10-23  0:31   ` Eray Ozkural
2003-10-23 16:55   ` skaller

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=3F966151.7080306@stratos-ad.com \
    --to=samsaga2@stratos-ad.com \
    --cc=caml-list@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).