-
Notifications
You must be signed in to change notification settings - Fork 23
Description
See, I am sending an angel ahead of you to guard you along the way and to bring you to the place I have prepared. -- Exodus 23:20
Version 2.0
- Fix the remaining ORC bugs and release the final 2.0 version early in 2023.
Version 2.2
Incremental compilation (IC) / nimsuggest / IDE tooling
This is a single point as for me it's a single thing. If we had a compiler that only recompiles the module that was touched the "nimsuggest" tool can be a simple command line tool that answers a single question like "where is symbol X used?".
We have this tool already, it's nim check --navigate, but the implementation of IC needs to be finished. In order to implement this feature in a disciplined manner that avoids complexity and hard to track down subtle bugs the following strategy will be followed:
With --ic:stress IC is enabled for every single module and the compiler always uses the same non-conditional logic:
The Nim compiler compiles a single a.nim module at a time. It is compiled to C(++). Let b.nim be a dependency of a.nim. If b.nim has been compiled to b.rod already and b.nim did not change since then, import b.rod and proceed.
Otherwise, compile b.nim via spawning another Nim compiler process that compiles b.nim to b.rod. Then proceed by importing b.rod. This rather simple setup ensures that by construction we stress test the mechanism completely, all the time. The downside is that all the required IO slows down the compiler a lot, so that development and testing will be slow.
- Finish the implementation of IC.
Stretch goals
Allow recursive module dependencies
- We should remove the requirement for forward declarations and allow for recursive module dependencies. Then we can remove these experimental features:
- "Package level objects"
- "code reordering"
see also
nim-lang/Nim#18818
nim-lang/Nim#18822
- parse the whole module at one time => fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now parses the whole module at one time Nim#21379
- simplify compilation pipeline => replaces implicit passes array registered at runtime with explicit function calls; simplify compilation pipeline Nim#21444
Language
-
Patch the full compiler to use "definite assignment analysis" itself => use strictdefs for compiler Nim#22365
-
"Void type" -- We should optimize away the "empty tuple" type in the backend and remove this feature.
-
"AST based overloading" -- Should be removed.
-
"Parallel & Spawn" -- Should be removed or overhauled. Currently it is better done by external packages.
deprecatestd/threadpool; usemalebolgia,weave,nim-taskpoolinstead Nim#22576 -
With our refined idea of "strict funcs", the algorithm for proving borrow checking correct can be much simpler and more precise. In other words, "view types" can be made stable for Nim 2.x.
Library
JSON
The JSON module is in a poor shape, the API exposes public fields, sometimes is not intuitive (the %* operator) and has poor performance. It could be split up into:
jsonbuilder, jsonparser, jsonlexer, jsontree, jsonmapper.
Async
The higher level async modules should be moved into their own Nimble package. The required building blocks like selectors.nim remain in the standard library, they served Nim well.
Less concrete goals
- Find a better design for "Term rewriting macros". Once done, deprecate the old feature.
- Find a better design for "Special Operators". Once done, deprecate the old feature.
- Implement "Aliasing restrictions in parameter passing". The compiler can always produce warnings first.
- Concepts: Find a way of how to infer
staticvalues and stabilize the feature. - Find a way of allowing a syntax like
of Value(let x, var y)and embrace an official pattern matching solution that makes use of this syntax.
Atlas tool
- Refine atlas so that it supports dependencies in subdirectories of the workspace.
- Add an alternative to
project.nimblelikeproject.lockso that lock files and reproducible builds are supported.
How can you help?
The standard library cleanups should be rather easy to do. Atlas is also still a very simple tool, only about 600 lines of Nim code.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status