M
Mark Hahn
has said:In AS, a, b, and c are all equivalent and independent; any changes
made to one do not affect the others. It's a no-brainer to use, and
quite safe. In Prothon, b and c derive state and behaviour from a
unless/until it's modified locally (ie on b or c). Changes made to one
may or may not show up in another depending on the derived
relationship and subsequent changes*,
I told you before that we had a Self-like copy and asked you then if using
that would make you happy. You never answered that question. Now you've
posted an example that ignores the Prothon copy (yes, it is spelled exactly
like the AS copy
Will you only be happy with Prothon if I rip out everything that is not like
AS or Self? Isn't having Prothon capable of doing everything AS and Self
can do, in the same way they do it, good enough for you? I know for a fact
that it can do everything they can do because there are months left in the
design and if you just got rid of that chip on your shoulder and pitched in
and helped, it could work well for people who want to use it like you do.
You should be aware that we are discussing right now the possibility of
putting the whole "class-mimicing" structure on an object that is a
descendent of a pure Self-like root object. Lenard is doing a pretty good
job of explaing to me why we sometimes need objects without the "class-like"
methods __new__ and __init__. Here is his response to my question about
that ("Object" is the "pure" object and "buildable" would have __new__ and
__init__):
------ Beginning of Lenard Lindstrom's post ------
This is all very logical and I have no problem with it, but can you give me
a usage example of an object that would inherit directly from Object instead
of Buildable?
I do not know about a specific usage example, but knowledge bases in
artificial
intelligence comes to mind as a general case:
object ClydeLike(Object):
$colour = "grey"
$legcount = 4
$mass = 2500
object Clyde(ClydeLike): # Lieberman got it wrong. I can explain in a
separate posting.
pass
object Fred(ClydeLike):
$mass = 2400
Probably anything whose attributes are initialized to contants, that is, no
calculations
are required. Then specific initial attribute values for an extension object
are set
with the object statement.
If descriptors are implemented in Prothon then value checks and special
computations
can be done on a per attribute bases, removing one more need for an _init_
function.
The Buildable prototype would come into play for immutables and objects that
convert
several input values into a different internal representation at creation
time.
---------- End of Lenard Lindstrom's post ------------
Lenard even said "Lieberman got it wrong." See! If you come over and help
out there are other like-minded people to work with you
By the way, the above code samples are from current builds of Prothon. The
object keyword was added recently.