Redesign
See original GitHub issueThis is a major redesign of Folktale, and it’s based on the following principles:
-
Make a better use of the ECMAScript language, specially ES2015-and-future features.
Arrow functions, async/await, maps, and friends provide a good set of functionalities for basing a functional standard library on.
-
Replace currying-by-default by a heavier use of arrow functions.
Currying is harder to reason about in dynamic languages because things can compose in too many ways, and there’s no type system to enforce correct composition. Incorrect composition usually results in silent or late errors.
-
Provide free-method versions of functions for This-Bind syntax
list::groupBy(f)
,list.sort(compare::on(first))
and others are clearer than their prefix counter-part, and we don’t need to mutate things. -
Where possible, as long as it doesn’t break our structure’s laws, use the language’s features/native methods.
Makes it easier to combine Folktale with other existing projects.
-
All methods should provide complete documentation on why they exist, and how to use them (see https://github.com/siren-lang/siren/blob/master/documentation/notes/organisation-and-design.md#how-to-write-documentation). This is being done with https://github.com/origamitower/metamagical
-
Monolithic package over several repositories.
It’s easier to use, and maintain something in a monolithic package than it is to maintain it across several repositories. It also makes things more consistent.
-
Logically grouped modules, containing only the absolutely minimum necessary for it.
Each module should be entirely self-contained, and contain only the minimum necessary for that particular functionality. Most of the time this means one function = one module, but not always (see the ADT module, and https://github.com/siren-lang/siren/blob/master/documentation/platform-design.md).
See https://github.com/origamitower/folktale/milestone/1 for tasks pending for this redesign.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:14 (11 by maintainers)
Top GitHub Comments
Ah oops, I forgot we had a checklist for this issue. You can see the issues here https://waffle.io/origamitower/folktale?milestone=v2.0.0 and here https://github.com/origamitower/folktale/milestone/1
Meeee toooo