Carp/docs/Todo.org
Erik Svedäng 5c280fea4b Todo.
2018-05-22 22:00:09 +02:00

5.6 KiB
Raw Blame History

Milestones

0.3 - Hopefully done "soon", fixing the most pressing issues.

0.4 - A nice minimal version of the language. Should be possible to use for somewhat realistic projects.

1.0 - The completed version of the language with all planned features and extra nice ergonomics.

Unsorted Todo:s

Syntax for pointer type, perhaps "^"?

Critical Bugs

0.3

References must keep track of their origin and prevent usage of them if the origin has been given away.

Can set a ref so it points to a value in a more short-lived scope, leads to 'stack-use-after-scope' error in clang-sanitizer.

The error reporting in Eval is a mess, must make it possible to return errors with correct location for all kinds of errors.

This hangs the repl: `(expand '(load-and-use SDL))`

def needs to come before hidden, or the compiler chokes

Big Language Features

0.4

Type annotations and private/hide flags should be honored.

Stack allocated Array with an explicit size.

Deps function for templates should return an Either to enable errors when instantiating deps.

*

1.0

Good hashmap implementation with support for "{}" syntax.

Tagged unions (also known as "sum types" or "enums")

Lambdas (anonymous functions) that compile on Windows and don't leak memory!

Smaller Language Features ("niceties")

0.4

Handle self-referencing members in structs (also for function types, i.e. "(deftype Foo [f (Fn [Foo] Foo)])")

Array.copy should just do a memcopy for primitive/plain types. Select most concrete version of 'copy'?

If main returns the value of a function returning a generic type it will fail (because there is no constraint for "Int or ()")

Errors in macros should present the code location of both the macro and of the code that uses of it.

Returning refs in functions should be possible to prove safe in some cases, if origin or ref is stored during memory management pass.

Should be possible to read float literal without '.', eg. "3f" (because that's how they print sometimes)

Defining a local variable messes up unqualified lookup of function with the same name, e.g. (let [words (words &s)] …)

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.

Report correct column in errors at all times, sometimes it's a bit too low.

Array.init-empty-with-capacity function. What's a better name?

Undefined symbol does not stop execution when running with -x

A way of telling Carp if an external type is primitive (and thus freely copy:able) or not and must be borrowed.

An "enumerated" function on array.

1.0

Macros for generating 'read' functions to read objects back into memory from string representation.

A way to assert compiler errors in tests

Rename type variables from t0, t1, t2 to a, b, c, etc.

Kind-checking for types (make sure the type variables match, etc).

Allow unification of generic struct '(t a)' with concrete struct, i.e. (Array Int).

Macro System

1.0

Quasiquote

Splicing in macros

Pattern matching on arguments in macros?

Some lists and similar things generated by built in dynamic functions like 'cons' etc don't create proper Info for their XObjs?

Tooling

0.4

Make the flags sent to the compiler be saved into different groups depending on actual compiler.

Hide instances of templates/generic functions when printing the environment (by default, allow it as a setting).

Entering the name of a symbol at the REPL prints nothing.

Show "call stack" when getting an error during concretization.

Allow echoing of infered type at the REPL (must be silenced when loading a file though)

Only reload files once, keep track of which ones have already been reloaded.

Prevent run if no exe has been successfully built.

Flycheck hangs and eats all resources sometimes.

Emacs-mode: Make foreach and deftype indent correctly.

Make foreach, and*, not*, etc. proper keywords.

1.0

Project templates.

Somehow make it possible to enter ":t foo" at the REPL (can't be done now because each atom is evaluated separately)

Preserve whitespace to allow saving forms back to disk.

Refactorings at the REPL. Rename, extract function, add/remove parameter?

watch flag for recompiling when the files in the project change?

Code generation

[1.X] LLVM backend

[?] Emit #LINE macros in the generated C code?

Libraries

Make Vector generic

Threading

Documentation

Document all core functions

Write a guide to how the compiler internals work

Improve the Memory.md docs

Ugliness

Would be nice if Info from deftypes propagated to the templates for source location of their member functions.

Language Design Considerations

How to handle heap allocated values? Box type with reference count?

Fixed-size stack allocated arrays would be useful (also as members of structs)

Macros in modules must be qualified right now, is that a good long-term solution or should there be a 'use' for dynamic code?

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?

Distinguish immutable/mutable refs?

Reintroduce the p-string patch but with support for embedded string literals?

Rename deftype to defstruct?

Notes

Travis

Should depsForCopyFunc and depsForDeleteFunc really be needed in Array templates, they should instantiate automatically when used?