On Sun, Oct 1, 2017 at 4:56 PM, Timo Paulssen <t...@wakelift.de> wrote:

> *method new* is useful only if you want to take positional parameters for
> the .new — the default new you get from *Mu* only accepts named arguments
> and passes them on as-is to *self.bless*. They then get passed to every
> *BUILD* and *TWEAK* in the inheritance chain. The named parameters don't
> have to correspond to attribute names, as you can do any private attribute
> assignment in *TWEAK* that you like.
>
And adding, just in case it isn't clear: the problem with positional
parameters to method new is there is no sane way to inherit them from
superclasses or make them usable from subclasses without baking them into
the entire object hierarchy. They make sense only for things like what Java
calls final classes, and even then probably only for atomic value types
(e.g. things like Int where the value is a single 'thing' and wholly
defines the identity of an instance).

-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to