123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- TODO list for Sidef
- New built-in classes:
- * Add the `Poly()` class for representing a polynomial.
- - See: "Math::Polynomial" on CPAN.
- - https://metacpan.org/pod/Math::Polynomial
- * Add the `PolyMod()` class for representing a modular polynomial.
- - See: "Math::Polynomial::ModInt" on CPAN.
- - https://metacpan.org/pod/Math::Polynomial::ModInt
- * Add the `Seq()` class for representing a sequence.
- - Take a block for computing the terms, based on the previous terms of the sequence.
- - Maybe allow array-like indexing.
- - Internal caching of terms.
- - See: https://docs.raku.org/type/Seq.html
- Classes:
- * Implement roles (from Raku) and add the `does` trait for classes.
- - See: https://docs.raku.org/language/objects#Roles
- Methods / functions:
- * Implement the `is exported` trait for functions and classes (maybe)
- Internal:
- * Switch to subroutine `signatures` (as soon as this feature becomes stable). (maybe)
- Performance:
- * Add dynamic cache inside all the immutable built-in objects (except IO-related) that take only one argument (the self-object), such that calling the same method again on
- the same object, will return the previous result from cache. When the object is destroyed, the cache is also destroyed with the object itself. This requires making all built-in
- objects blessed HASH references. Currently, the String class blesses a scalar string, which do not allow any other fields inside the object to be stored. The Number class blsesses
- a REF, etc... This change would require quite a lot of work, but the performance improvements may pay off in the end.
- Speculations:
- * Make all built-in objects immutable, allowing dynamic cache to be applied to all built-in objects.
- * Make all core methods (including user-defined methods) real multimethods, using Class::Multimethods.
- * Bootstrap Sidef by writing a code generator in Sidef that generates Perl code.
- * Rewrite all core libraries in Sidef.
- Incompatible changes (maybe):
- * Change the ternary operator `bool ? (true) : (false)` to `bool ?? (true) !! (false)`.
- * Allow `?` at the end of (boolean) methods and rename `.is_PROPERTY` to `.PROPERTY?`. (e.g.: `n.is_prime` would become `n.prime?`)
- * Allow `:` at the end of a method call, followed by an argument. (e.g.: `a.push: 42` would be equivalent with `a.push(42)`)
- * Rename the conversion methods `.to_n`, `.to_s`, `.to_a` to `.Num`, `.Str`, `.Arr`.
|