-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOTES
35 lines (24 loc) · 1.19 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
At 9.4.3:
* Currency was missing, added some hobby class representing a string.
* Methodless Role Types created as PHP Interfaces.
* Used Fully-Qualified Namespaces for method parameters.
At 9.4.4:
* Currency grows with operations and abstract Account base class was
added for the examples different account types.
* Methodful Object Roles (classes) created as PHP Traits.
>>> Traits can not be defined against the Methodless Role Type
Interfaces. Mock as class, implement interface, stub methods and
change class to trait, remove extends. <<<
Scala Copy:
* Traits in PHP are compile time copy and paste only. So this is actual
a pretty limited language feature and not a first class citizen.
- It does not support extending classes.
- It does not support implementing interfaces.
- It is just members only: Constants, Property and Function definition.
* For dynamic extension at runtime, the following two have been considered:
1. Decorator
(-) Can not access private members/functions
2. Serializer
(-) Does not work with models that do not serialize.
* Casting via eval() for the class creation and serialize() for casting
has been implemented.