caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Why aren't OCaml constructors functions?
@ 2015-06-18 14:49 Kristopher Micinski
  2015-06-18 15:16 ` Andreas Hauptmann
  0 siblings, 1 reply; 3+ messages in thread
From: Kristopher Micinski @ 2015-06-18 14:49 UTC (permalink / raw)
  To: caml-list

This is an obvious question with an answer that is nonobvious to me.

One potential reason I could believe is that it might be a performance
optimization to ensure that all constructors were known to be fully
applied when used.  But that seems unnecessary: a simple rewrite rule
(even syntactic) would likely fix this for the majority of cases.
This leads me to believe it isn't the reason.

Another reason might be to avoid potential name clashes.  I typically
name constructors things that might also be reasonable function names,
but not often.

I've done a fair amount of googling on this and can't find any threads
on this, searching back through this list down to 2012.  It's possible
I missed something.

Kris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Why aren't OCaml constructors functions?
  2015-06-18 14:49 [Caml-list] Why aren't OCaml constructors functions? Kristopher Micinski
@ 2015-06-18 15:16 ` Andreas Hauptmann
  2015-06-18 17:00   ` Kristopher Micinski
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Hauptmann @ 2015-06-18 15:16 UTC (permalink / raw)
  To: caml-list

On Thu, 18 Jun 2015 10:49:25 -0400
Kristopher Micinski <micinski@cs.umd.edu> wrote:
> I've done a fair amount of googling on this and can't find any threads
> on this, searching back through this list down to 2012.  It's possible
> I missed something.

2001:
https://groups.google.com/forum/message/raw?msg=fa.caml/IOlkCcVBg5Q/vCx5VdZNxOMJ



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Why aren't OCaml constructors functions?
  2015-06-18 15:16 ` Andreas Hauptmann
@ 2015-06-18 17:00   ` Kristopher Micinski
  0 siblings, 0 replies; 3+ messages in thread
From: Kristopher Micinski @ 2015-06-18 17:00 UTC (permalink / raw)
  To: Andreas Hauptmann; +Cc: caml-list

Awesome, thanks for the pointer!

Kris


On Thu, Jun 18, 2015 at 11:16 AM, Andreas Hauptmann
<andreashauptmann@t-online.de> wrote:
> On Thu, 18 Jun 2015 10:49:25 -0400
> Kristopher Micinski <micinski@cs.umd.edu> wrote:
>> I've done a fair amount of googling on this and can't find any threads
>> on this, searching back through this list down to 2012.  It's possible
>> I missed something.
>
> 2001:
> https://groups.google.com/forum/message/raw?msg=fa.caml/IOlkCcVBg5Q/vCx5VdZNxOMJ
>
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-18 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 14:49 [Caml-list] Why aren't OCaml constructors functions? Kristopher Micinski
2015-06-18 15:16 ` Andreas Hauptmann
2015-06-18 17:00   ` Kristopher Micinski

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).