Category:PhixClass: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Phix does not force the use of an objected orientated programming paradigm, but allows it where appropriate. |
Phix does not force the use of an objected orientated programming paradigm, but allows it where appropriate. |
||
The following is simply a collection of rosettacode entries that make use of any class or struct handling. |
|||
Note that the rest of Phix uses copy-on-write semantics, such that after <code>object a = ''something'', b = a</code> modifying a or b will leave the other intact, whereas structs and classes are proper references, such that after <code>myclass a = new(), b = a</code> modifying a or b will modify them both. |
|||
These features are mostly implemented via the auto-include builtins\structs.e, but of course also tightly integrated into the main language parser. |
These features are mostly implemented via the auto-include builtins\structs.e, but of course also tightly integrated into the main language parser. |
Revision as of 18:29, 11 April 2020
Phix does not force the use of an objected orientated programming paradigm, but allows it where appropriate.
The following is simply a collection of rosettacode entries that make use of any class or struct handling.
Note that the rest of Phix uses copy-on-write semantics, such that after object a = something, b = a
modifying a or b will leave the other intact, whereas structs and classes are proper references, such that after myclass a = new(), b = a
modifying a or b will modify them both.
These features are mostly implemented via the auto-include builtins\structs.e, but of course also tightly integrated into the main language parser.
This category currently contains no pages or media.