[self-interest] Cheatsheet

Russell Allen mail at russell-allen.com
Sun Mar 6 23:26:11 UTC 2016


Good idea.

I think maybe some rephrasing might help about parent slots though.

Self objects can have one or more ‘parent’ slots, which are slots marked with ‘*’ which function as delegatee objects. traits, mixing and ‘parent*’ slots all use the ‘parent slot’ mechanism - as does namespaces. 

Having objects with a single delegatee named parent* pointing to a trait (which is in turn part of a trait heirarchy) is a common pattern but not baked into the language. 

So FWIW where the cheat sheet says:

parent* slot
Every object may also contain parent* slot (star is mandatory), to which the lookups unresolved in self slot is delegated. This implements the inheritance.

Maybe it should say something like: 

parent slots
Every object may also contain one or more parent slots, which are slots whose names end in a star (*). Lookups unresolved in the receiving object are delegated to these parent slots. This is used to implement inheritance (often with a single parent slot named 'parent*') and also mixins, and namespaces. 

Also the definition of mixins is:

Mixins
Small objects filled with shared code. This code doesn’t contain parent* slot, and it is thus not directly part of the OOP tree. Approximate analogy to other languages would be interface with (partial) implementation.

Maybe this should be something like:

Mixins
Mixins are small, parentless bundles of behavior designed to be “mixed into” some other object. Approximate analogy to other languages would be interface with (partial) implementation.

- Russell


> On 5 Mar 2016, at 9:37 pm, Stephen De Gabrielle spdegabrielle at gmail.com [self-interest] <self-interest at yahoogroups.com> wrote:
> 
> This should go on the website.
> 
> S
> 
> 
> On Wed, 2 Mar 2016 at 20:38, David Ungar ungar at me.com <mailto:ungar at me.com> [self-interest] <self-interest at yahoogroups.com <mailto:self-interest at yahoogroups.com>> wrote:
>  
> Love that you did this. And I’m so proud that the basic language fits on one page!
> 
> - David
> 
> 
> 
> > On Mar 2, 2016, at 11:28 AM, Bystroushaak bystrousak at kitakitsune.org <mailto:bystrousak at kitakitsune.org> [self-interest] <self-interest at yahoogroups.com <mailto:self-interest at yahoogroups.com>> wrote:
> > 
> > Hi.
> > 
> > This may be useful to beginners:
> > 
> > https://github.com/Bystroushaak/SelfCheatSheet <https://github.com/Bystroushaak/SelfCheatSheet>
> > 
> > 
> > 
> > 
> > ------------------------------------
> > 
> > ------------------------------------
> > 
> > 
> > ------------------------------------
> > 
> > Yahoo Groups Links
> > 
> > 
> > 
> 
> 
> 
> -- 
> Kind regards,
> Stephen
> --
> Bigger than Scheme, cooler than Clojure & more fun than CL.(n=1)
> --
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20160307/7571c358/attachment.html>


More information about the Self-interest mailing list