Re: Capabilities interact nicely with Substructural Types and Reactivity

David Barbour <[email protected]>
Newsgroups gmane.comp.capabilities.general
Message-ID <CAAOQMSujC2zqnNGbjhiVRvXQGQRNv0y-io38nVu9WERdwD+kXg@mail.gmail.com>
On Thu, Sep 12, 2013 at 2:09 PM, Rob Meijer <rmeijer-qWit8jRvyhVmR6Xm/[email protected]> wrote:

> On Thu, September 12, 2013 18:21, David Barbour wrote:
> > I wasn't speaking of creating any *particular class*, but rather the
> > *ambient authority to `new` in general*.
> >  [..]
> > Private constructors have no effect on this at all.
> >
>
> On itself it might not, but when combined with other language features, it
> could:
>

>
> http://minorfs.wordpress.com/2013/01/18/raiicap-pattern-injected-singleton-alternative-for-c/


What I described (ambient authority to create state and identity, i.e.
*any* new objects)
and what everyone else here seems to be hearing (ambient authority to
create *specific* new objects) are very different issues. Unfortunately,
like many writers, I'm in a bad position to understand why this distinction
isn't as super-obvious and clear to everyone else as it is to me.

Could you explain how you think singletons are related?


>
> This pattern uses private-constructors, friends and templates and
> optionally polymorphism to create what in an o-cap version of C++ might be
> considered constructor caps.
>
> It would be very interesting to explore if such a construct could be
> possible in an ocap language.
>

Sealer/unsealer pairs can model the full gamut of nominative types, ADTs,
classes, private constructors, etc.. Even better, they can do so in a *first
class* manner. Sealer/unsealer pairs offer more expressiveness than ghost
types. They're pretty useful.

_______________________________________________
cap-talk mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/cap-talk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.