Carp/docs/Todo.md

80 lines
4.7 KiB
Markdown
Raw Normal View History

2017-10-10 14:20:59 +03:00
# Todo
2017-11-20 12:15:57 +03:00
## Milestones
2018-01-19 01:00:24 +03:00
* 0.3 - Hopefully done "soon", fixing the most pressing issues.
2017-12-07 20:11:10 +03:00
* 0.4 - A nice minimal version of the language. Should be possible to use for somewhat realistic projects.
2017-11-20 12:15:57 +03:00
* 1.0 - The completed version of the language with all planned features and extra nice ergonomics.
2017-10-10 14:20:59 +03:00
## Critical Bugs
2018-02-01 19:29:45 +03:00
* [0.3] Instantiating generic struct with ref-type fails.
2018-01-02 11:09:22 +03:00
* [0.3] Must handle deletion of temporary values used during initialization of global variables.
2018-01-03 17:12:14 +03:00
* [0.3] When 'set!':ing a global variable, memory can leak.
2017-10-17 10:02:12 +03:00
2017-10-10 14:20:59 +03:00
## Big Language Features
2017-12-13 10:45:31 +03:00
* [0.4] Doc strings.
* [0.4] Kind-checking for types (make sure the type variables match, etc).
2017-12-13 10:45:31 +03:00
2017-11-20 12:15:57 +03:00
* [1.0] Tagged unions (also known as "sum types" or "enums")
2017-12-07 20:11:10 +03:00
* [1.0] Lambdas (anonymous functions) that compile on Windows and don't leak memory!
2017-10-10 14:20:59 +03:00
## Smaller Language Features ("niceties")
2018-01-03 17:15:47 +03:00
* [0.3] Implement 'prn' that prints in a readable format, make 'str' print humanly.
2018-01-19 01:00:24 +03:00
* [0.3] Make the type of 'set!' be (set! a a) instead of (set! &a a).
2017-12-07 20:11:10 +03:00
* [0.3] Errors in macros should present the code location of both the macro and of the code that uses of it.
2017-12-13 10:45:31 +03:00
* [0.3] If main returns the value of a function returning a generic type it will fail (because there is no constraint for "Int or ()")
2018-01-03 17:12:14 +03:00
* [0.3] Optimization: Don't copy the whole array in Array.swap, Array.aupdate, etc.
* [0.3] When registering with an interface, make sure the registered function actually *can* unify with it's signature.
2017-12-13 10:45:31 +03:00
* [0.4] Reintroduce the p-string patch but with support for embedded string literals.
* [0.4] Should be possible to read float literal without '.', eg. "3f" (because that's how they print sometimes)
* [0.4] Defining a local variable messes up unqualified lookup of function with the same name, e.g. (let [words (words &s)] ...)
2017-12-04 09:40:06 +03:00
* [0.4] The type error when setting a variable but missing the '&' is confusing: "Can't unify Int with &Int"
* [0.4] Defining a function like 'add-ref' (see the numeric modules), refering to '+' does not resolve to '+' inside the module, which gives the function an overly generic type.
2017-12-13 10:45:31 +03:00
2017-11-21 14:35:35 +03:00
* [1.0] A way to assert compiler errors in tests
2017-11-20 12:15:57 +03:00
* [1.0] Rename type variables from t0, t1, t2 to a, b, c, etc.
2017-11-20 10:04:29 +03:00
## Macro System
2017-11-20 12:15:57 +03:00
* [0.3] Some lists and similar things generated by built in dynamic functions like 'cons' etc don't create proper Info for their XObjs
2017-12-13 10:45:31 +03:00
2017-11-20 12:15:57 +03:00
* [1.0] Quasiquote
* [1.0] Splicing in macros
* [1.0] Pattern matching on arguments in macros?
2017-11-20 10:04:29 +03:00
2017-11-20 10:05:08 +03:00
## Tooling
2018-01-27 14:01:27 +03:00
* [0.3] Project setting for turning off bound checks and similar ("--optimize"). Should also run the C compiler at at least -O2.
* [0.3] Errors in the parser or emitter don't stop evaluation, only errors during evaluation?
2017-11-20 12:15:57 +03:00
* [0.3] Somehow make it possible to enter ":t foo" at the REPL (can't be done now because each atom is evaluated separately)
2017-12-15 17:31:56 +03:00
* [0.3] The (project-set! ...) command should accept args of various types, not just String.
2018-01-26 20:53:35 +03:00
* [0.3] When running :rb, shouldn't carp stop when :r returns an error, instead of building the wrong main.c?
2017-12-13 10:45:31 +03:00
2017-11-20 12:15:57 +03:00
* [0.4] Print a warning when changing the type of a function (can create bugs by overriding earlier declarations with the same name)
* [0.4] Hide instances of templates/generic functions when printing the environment (by default, allow it as a setting)
* [0.4] Entering the name of a symbol at the REPL prints nothing.
2017-12-23 15:54:47 +03:00
* [0.4] Show "call stack" when getting an error during concretization.
2017-12-13 10:45:31 +03:00
2017-11-20 12:15:57 +03:00
* [1.0] Preserve whitespace to allow saving forms back to disk
* [1.0] Refactorings at the REPL. Rename, extract function, add/remove parameter?
2017-11-20 10:05:08 +03:00
## Code generation
2017-11-20 12:15:57 +03:00
* [1.X] LLVM backend
* [?] Emit #LINE macros in the generated C code
2017-11-20 10:05:08 +03:00
2017-11-20 10:04:29 +03:00
## Ugliness
* [1.0] Would be nice if Info from deftypes propagated to the templates for source location of their member functions.
2017-11-20 12:15:57 +03:00
* [1.0] Remove unnecessary Array-functions and rewrite them in Carp?
* [1.0] "Setting" of string literals? (let [x "a"] (set! x @"b"))
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)
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)
2018-01-19 01:00:24 +03:00
* Macros in modules must be qualified right now, is that a good long-term solution or should there be a 'use' for dynamic code?
2017-11-20 10:04:29 +03:00
* Allow use of 'the' as a wrapper when defining a variable or function, i.e. (the (Fn [Int] Int) (defn [x] x))?
* Being able to use 'the' in function parameter declarations, i.e. (defn f [(the Int x)] x) to enforce a type?
2018-01-23 09:19:55 +03:00
* Distinguish immutable/mutable refs?
2018-01-23 10:32:47 +03:00
## Notes
2018-01-27 14:01:27 +03:00
* Should depsForCopyFunc and depsForDeleteFunc really be needed in Array templates, they *should* instantiate automatically when used?