Carp/docs/Todo.md

49 lines
2.5 KiB
Markdown
Raw Normal View History

2017-10-10 14:20:59 +03:00
# Todo
## Critical Bugs
2017-10-12 22:20:18 +03:00
* The 'range' function is fully generic (for all 'a') but only compiles when 'a' is numeric type
2017-10-13 13:19:22 +03:00
* Go over all the Array functions and make sure they are memory safe
2017-10-13 17:04:06 +03:00
* Can't define globals of type String or String-ref.
* Just entering '=' at the REPL leads ot strange type error.
2017-10-15 12:08:12 +03:00
* The 'foreach' macro should not make use of 'transform' (it allocates an array)
2017-10-10 14:20:59 +03:00
## Big Language Features
* Generic data types (apart from Array, which already is)
* Tagged unions (also known as "sum types" or "enums")
* Lambdas (anonymous functions)
* Remove unnecessary Array-functions and rewrite them in Carp
2017-10-10 14:20:59 +03:00
## Smaller Language Features ("niceties")
2017-10-17 09:05:26 +03:00
* Allow lambda ("λ") as an alias for Fn when defining types
2017-10-13 13:31:33 +03:00
* Good string functions
2017-10-13 13:48:18 +03:00
* Being able to use 'the' in function parameter declarations, i.e. (defn f [(the Int x)] x) to enforce a type
2017-10-17 09:05:26 +03:00
* Allow use of 'the' as a wrapper when defining a variable or function, i.e. (the (Fn [Int] Int) (defn [x] x))
2017-10-16 15:36:01 +03:00
* Quote
* Quasiquote
* Splicing in macros
2017-10-17 09:05:26 +03:00
* Pattern matching on arguments in macros?
2017-10-17 09:08:27 +03:00
* Printing of floats/doubles should remove superfluos zeros at the end
2017-10-10 14:20:59 +03:00
2017-10-10 14:50:47 +03:00
## Language Design Considerations
2017-10-12 09:05:54 +03:00
* What's the correct type of the variable in a set!-form, i.e. (set! &x value) or (set! x value)
* Is some kind of interface/typeclass construct worthwhile?
2017-10-10 21:13:58 +03:00
* How should passing primitive types (that do not care about being referenced) as ref:ed parameters be handled?
2017-10-12 09:05:54 +03:00
* How to handle heap allocated values? Box type with reference count?
2017-10-12 22:20:18 +03:00
* Fixed-size stack allocated arrays would be useful (also as members of structs)
* Look over how many times the function 'annotateOne' in Infer.hs actually needs to be applied to a form
2017-10-10 14:50:47 +03:00
2017-10-10 14:20:59 +03:00
## Code generation
* LLVM backend
* Emit #LINE macros in the generated C code
## Tooling
2017-10-13 17:04:06 +03:00
* Enable printing of typed AST:s at the REPL to help debug unresolved type variables etc.
2017-10-10 21:13:58 +03:00
* Proper error handling when defining invalid struct types (right now it crashes)
* Stop evalutaion of forms after errors to avoid "Trying to refer to undefined symbol" error
* Built in REPL history (without using rlwrap)
* Preserve whitespace to allow saving forms back to disk
2017-10-13 13:19:22 +03:00
* Refactorings at the REPL. Rename, extract function, add/remove parameter?
* Hide instances of templates/generic functions when printing the environment (by default, allow it as a setting)
2017-10-12 19:15:41 +03:00
* Somehow make it possible to enter ":t foo" at the REPL (can't be done now because each atom is evaluated separately)
2017-10-12 19:18:07 +03:00
* Rename type variables from t0, t1, t2 to a, b, c, etc.