1. object-based vs object-oriented // new nomenclature
- Posted by _tom (admin) Jan 11, 2021
- 737 views
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
2. Re: object-based vs object-oriented // new nomenclature
- Posted by katsmeow Jan 12, 2021
- 719 views
Got to tie this into your re-write on "Parmeter passing"... I want something short and snappy.
Parmeter was that guy in "F Troop" ?
Kat
3. Re: object-based vs object-oriented // new nomenclature
- Posted by katsmeow Jan 12, 2021
- 744 views
I wonder if an "object based" program would lead to something vile like:
object webpage = eval(fget("news.exw")) puts(1,webpage)
Kat