rfc:collections
Differences
This shows you the differences between two versions of the page.
rfc:collections [2023/05/02 15:40] – very early draft derick | rfc:collections [2023/05/02 15:42] (current) – Fixed syntax derick | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2023-04-24 | * Date: 2023-04-24 | ||
* Author: Derick Rethans < | * Author: Derick Rethans < | ||
- | * Status: Draft | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 25: | Line 25: | ||
Design Goals: | Design Goals: | ||
- | * keep it simple | + | * |
- | * default behaviour should be the most expected | + | |
- | * prefer a method per function, instead of allowing the behaviour of a method to be changed through (optional) arguments. | + | |
- | * operations are on **graphemes** | + | |
- | * no redundant methods that can be constructed from other methods, unless they already exist in PHP, or are frequently used | + | |
- | * more as we discuss this... | + | |
Non Design Goals: | Non Design Goals: | ||
- | * introduce every feature of the intl extension | + | * |
==== Syntax ==== | ==== Syntax ==== | ||
+ | < | ||
collection Articles(int => Article) | collection Articles(int => Article) | ||
{ | { | ||
} | } | ||
+ | </ | ||
Is short hand for, but acts like ArrayAccess too: | Is short hand for, but acts like ArrayAccess too: | ||
+ | < | ||
class Articles | class Articles | ||
{ | { | ||
Line 73: | Line 71: | ||
} | } | ||
} | } | ||
+ | </ | ||
rfc/collections.1683042005.txt.gz · Last modified: 2023/05/02 15:40 by derick