[Under Construction]
This is a draft description of a hypothetical language to hopefully clarify the pseudo-code I've been using on some HOF-versus-OOP discussions in which it is claimed that better designed OOP language would be more competitive with HOF's and similar constructs in terms of parsimony. Criticism is that the example language is not described sufficiently to make the points clear.
It has these features:
- No distinction between "class" and "object". "Class" is used to indicate a more formal or involved declaration (instantiation).
- Its OO model is similar in flavor to PrototypeBasedProgramming, but not identical. A pointer to the parent is maintained to provide inheritance. (A "clone" operation is available if one wants to use prototyping: y=clone(x);)
- Parent methods can optionally run in addition to the child if the "before" or "after" keyword is added. If two or more parents (ancestors) are defined to run in addition to the child(s), the highest (earliest defined) class gets priority (runs first).
- Methods can be added after object/class declaration.
- The syntax conventions of [insert topics] is assumed if an alternative is not stated
- To keep the syntax compact, a language may not need the "function" or "method" keyword, depending on how other parts of the language is designed. I will include "method" for clarity. If the comparison is over "code size", then please keep this in mind because the key-word may not be necessary in a language.
- "function" and "method" are the same thing in the draft language and are interchangeable and supported for familiarity. As a convention, one typically uses "function" if they don't intend to instantiate the surrounding class.
- Decisions meant to optimize this language as a "training", illustrative, or experimental language may not be best for a production language. Thus, I am not necessarily endorsing these features as production features. If you wish to know the design reason of a feature, ask.
I use a notepad to scribble my uncooked ideas. I save them somewhere in the cloud.
Maybe you wanted to ensure the existence of this page name because you believed somebody else may have the same idea and take the page themselves. I dunno.
-- ChaunceyGardiner
Okay, next time I'll consider that. Those who are curious can check here for progress or status, though. Some seemed "eager" for details.
{Eager for our questions to be answered, more like. Whilst the above provides a nice overview, it still doesn't answer any of our -- quite specific -- questions.}
I believe they are scattered about. May I request that you centralize them here as a favor?
{Don't you know where you used examples of your language? I don't.}
In the relatively recent HOF-vs-OOP fights you complained about my pseudo-code having ambiguities.
{Yes, I remember that topics, but can't find the specific pages. NodeJsAndHofDiscussionTwo had some specific issues, but they weren't the ones I was thinking of.}
- Well I don't see how we can discuss OO when we have not yet agreed on the value of a value.
CategoryExample, CategoryObjectOrientation