Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] private object constructor?
@ 2017-02-13 18:23 Steffen Smolka
  2017-02-13 18:57 ` Ivan Gotovchits
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Smolka @ 2017-02-13 18:23 UTC (permalink / raw)
  To: Caml List

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

Hi,

Is it possible to expose an object or class type in OCaml without exposing
the constructor, i.e. the ability to construct objects of the type? OCaml
supports private ADTs and type synonyms, but the private keyword doesn't
seem to work with classes or objects.

Thanks,
-- Steffen

[-- Attachment #2: Type: text/html, Size: 369 bytes --]

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

end of thread, other threads:[~2017-02-13 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 18:23 [Caml-list] private object constructor? Steffen Smolka
2017-02-13 18:57 ` Ivan Gotovchits
2017-02-13 19:11   ` Steffen Smolka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox