caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Gerd Stolpmann" <info@gerd-stolpmann.de>
To: "Romain Bardou" <bardou@lri.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Generic printer patch
Date: Thu, 8 Dec 2011 15:21:32 +0100	[thread overview]
Message-ID: <0eb782f52b0657238463c6a52b0d37c7.squirrel@gps.dynxs.de> (raw)
In-Reply-To: <4EE0A6C6.8040703@lri.fr>


>>> 2) Could you imagine to generalize it to Format.formatter or to
>>> out_channel (without creating a string and concatenating)? Romain
>>> Bardou
>>> add in the mantis tracker (I can't give you the bugtracking number
>>> since
>>> mantis "is currently offline for maintenance") a feature wish for a new
>>> conversion specification that can print anything. Do you think you can
>>> fulfill is dream?
>
> Here is the feature request I proposed:
>
> http://caml.inria.fr/mantis/view.php?id=4956
>
> Here is the response by Pierre Weis:
>
> "This is a major feature wish that requires careful thinking and a lot
> of work!
>
> Furthermore, we would not have a completely satisfactory solution in the
> end (due to this <poly> catch all case that tend to propagate, as far as
> you use polymorphic functions). The correct solution to get this feature
> in its full glory is a major modification of the type system along the
> lines of G'Caml.

Well, G'Caml did not appear finally. But this explains why no generic
printer has been added so far: There was always the hope to get this
feature automatically by some generalization in the compiler. Same for
type-safe unmarshalling, and other features needing introspection.

On the one hand, these features are badly needed by users. On the other
hand, the language designers strive for an excellent solution, and not one
that will become obsolete sooner or later.

The situation is different today. We'll now have GADTs in the next
release, which work quite differently, and which are no replacement for a
separate introspection solution (like the one Alain suggests), but could
be a clever add-on. So, it has become more likely that the pragmatism wins
this time, because it makes the new playground GADTs more enjoyable (in
particular when the compiler supports the generation of "standard GADTs"
just representing the structure of a type).

Gerd

>
> In short, a natural feature wish in a strongly typed polymorphic
> language; we had it in mind for decades; unfortunately, we are not yet
> ready to offer it, even in the rather limited extent you proposed."
>
> In other words: what you did is awesome but I'm not sure that it will be
> added in the trunk :(
>
> Cheers,
>
> --
> Romain Bardou
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>


-- 
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.



  reply	other threads:[~2011-12-08 14:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 15:28 Jérémie Dimino
2011-12-07 16:46 ` Alex Rubinsteyn
2011-12-07 17:10   ` Jérémie Dimino
2011-12-07 16:56 ` François Bobot
2011-12-07 17:34   ` Jérémie Dimino
2011-12-08 12:00     ` Romain Bardou
2011-12-08 14:21       ` Gerd Stolpmann [this message]
2011-12-08 18:20       ` Martin Jambon
2011-12-08 21:39         ` Gabriel Scherer
2011-12-09  7:22           ` Jérémie Dimino
2011-12-09  9:26             ` Gabriel Scherer
2011-12-09  7:15         ` Jérémie Dimino
2011-12-08  2:33 ` Edgar Friendly
2011-12-08  7:28   ` François Bobot
2011-12-08  9:00   ` Alain Frisch
2011-12-08  9:24     ` Gerd Stolpmann
2011-12-08 10:32       ` Alain Frisch
2011-12-08 10:41         ` Jonathan Protzenko
2011-12-08 12:00           ` Philippe Veber
2011-12-08  5:26 ` Martin Jambon
2011-12-08  6:52   ` Jérémie Dimino
2011-12-08  7:44     ` Martin Jambon
2011-12-08  9:37       ` Jérémie Dimino

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=0eb782f52b0657238463c6a52b0d37c7.squirrel@gps.dynxs.de \
    --to=info@gerd-stolpmann.de \
    --cc=bardou@lri.fr \
    --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).