object-based vs object-oriented // new nomenclature

new topic     » topic index » view thread      » older message » newer message

A few times in the history of Euphoria a new user has complained that the object data-type is not "object oriented", could not understand what an object is, and (likely?) abandoned Euphoria because it was not OOP.

The word object is baked into the language, so let's use it to its full potential.

I propose two terms: object-based, and object-oriented.

Typical Euphoria|Phix code is object-based "where a variable is the value." You must explicitly assign a value to a variable to change its value--this gives you readable and safe code. Very simple.

Phix now has object-oriented programming after the addition of struct and class "where a variable refers to a value." Object-oriented programming adds the possibility of aliasing and values being changed without an obvious assignment. This lets you fully exploit dot notation, which can be fun. Not so simple--but useful.

The advantage goes to Phix (compared to most OOP languages) because you have a choice.

This is separate from the ideas of internal pointers used in the interpreter. Pointers "automagically" point objects into number or sequence storage of values as needed, and "automagically" allow pass-by-value arguments to behave efficiently. Phix does a lot in the background to make the language "look simple" to the code writer.

Got to tie this into your re-write on "Parmeter passing"... I want something short and snappy.

be well
_tom

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu