mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
189 lines
6.1 KiB
Plaintext
Executable File
189 lines
6.1 KiB
Plaintext
Executable File
version 0.9.0
|
|
=============
|
|
|
|
- implement 'gorge'
|
|
- make templates hygienic by default: try to gensym() everything in the 'block'
|
|
of a template
|
|
- ``bind`` for overloaded symbols does not work apparently
|
|
- ``=`` should be overloadable; requires specialization for ``=``
|
|
- fix remaining generics bugs
|
|
- fix remaining closure bugs:
|
|
- fix evals.nim with closures
|
|
- deactivate lambda lifting for JS backend
|
|
- Test capture of for loop vars; test generics;
|
|
- test constant closures
|
|
- implement closures that support nesting > 1
|
|
- implement proper coroutines
|
|
|
|
- document 'do' notation
|
|
- dead code elim for JS backend; 'of' operator for JS backend
|
|
- unsigned ints and bignums; requires abstract integer literal type:
|
|
use tyInt+node for that
|
|
- implement the high level optimizer
|
|
- change overloading resolution
|
|
- ``hoist`` pragma for loop hoisting
|
|
- we need to support iteration of 2 different data structures in parallel
|
|
- make exceptions compatible with C++ exceptions
|
|
- change how comments are part of the AST
|
|
- find a better solution for gensym instead of `*ident`
|
|
- extract nimdoc properly and document it finally
|
|
- rethink the syntax: distinction between expr and stmt is unfortunate;
|
|
indentation handling is quite complex too; problem with exception handling
|
|
is that often the scope of ``try`` is wrong and apart from that ``try`` is
|
|
a full blown statement; a ``try`` expression might be a good idea to make
|
|
error handling more light-weight
|
|
people also want ``inc a; inc b``
|
|
|
|
|
|
Bugs
|
|
----
|
|
|
|
- bug: stress testing basic method example (eval example)
|
|
without ``-d:release`` leaks memory?
|
|
- bug: pragma statements in combination with symbol files are evaluated twice
|
|
but this can lead to compilation errors
|
|
|
|
|
|
version 0.9.XX
|
|
==============
|
|
|
|
- implicit ref/ptr->var conversion; the compiler may store an object
|
|
implicitly on the heap for write barrier efficiency; better:
|
|
proc specialization in the code gen
|
|
- EcmaScript needs a new and better code gen: simply adapt the C code gen to it
|
|
- tlastmod returns wrong results on BSD (Linux, MacOS X: works)
|
|
- nested tuple unpacking; tuple unpacking in non-var-context
|
|
- 'nimrod def': does not always work?
|
|
- test branch coverage
|
|
- make pegs support a compile-time option and make c2nim use regexes instead
|
|
per default?
|
|
- 'const' objects including case objects
|
|
- improve docgen to use the semantic pass
|
|
- 'export' feature (requires improved docgen)
|
|
- think about ``{:}.toTable[int, string]()``
|
|
- mocking support with ``tyProxy`` that does:
|
|
o.p(x) --> p(o, x) --> myMacro(p, o, x)
|
|
|
|
This is really the opposite of ``tyExpr``:
|
|
* For parameter ``tyExpr`` any argument matches.
|
|
* Argument ``tyProxy`` matches any parameter.
|
|
|
|
- nice idea:
|
|
|
|
p(a, b):
|
|
echo a
|
|
echo b
|
|
|
|
is the same as:
|
|
|
|
p(a, b, proc() =
|
|
echo a
|
|
echo b)
|
|
|
|
Library
|
|
-------
|
|
|
|
- suffix trees
|
|
- locale support; i18n module
|
|
- bignums
|
|
|
|
- pdcurses bindings
|
|
|
|
- for system:
|
|
proc `@` [T](a: openArray[T]): seq[T] =
|
|
newSeq(result, a.len)
|
|
for i in 0..a.len-1: result[i] = a[i]
|
|
|
|
--> ensure @[] calls the array version!
|
|
|
|
|
|
Low priority
|
|
------------
|
|
|
|
- ``with proc `+`(x, y: T): T`` for generic code
|
|
- new feature: ``distinct T with operations``
|
|
- find a way for easy constructors and destructors; (destructors are much more
|
|
important than constructors)
|
|
- code generated for type information is wasteful
|
|
- resizing of strings/sequences could take into account the memory that
|
|
is allocated
|
|
- timeout for locks
|
|
- compilation cache:
|
|
- adapt thread var emulation to care about the new merge operation
|
|
- check for interface changes; if only the implemenation changes, no
|
|
need to recompile clients; er ... what about templates, macros or anything
|
|
that has inlining semantics?
|
|
- codegen should use "NIM_CAST" macro and respect aliasing rules for GCC
|
|
- GC: precise stack marking;
|
|
escape analysis for string/seq seems to be easy to do too;
|
|
even further write barrier specialization
|
|
- GC: marker procs Boehm GC
|
|
- implement marker procs for assignment and message passing
|
|
- warning for implicit openArray -> varargs conversion
|
|
- implement explicit varargs; **but** ``len(varargs)`` problem remains!
|
|
--> solve by implicit conversion from varargs to openarray
|
|
- optimize method dispatchers
|
|
- activate more thread tests
|
|
- implement ``--script:sh|bat`` command line option; think about script
|
|
generation
|
|
|
|
|
|
Further optimization ideas
|
|
==========================
|
|
|
|
- To optimize further copies away, you want to gather the additional
|
|
information inlining would provide, but don't inline for code size reasons.
|
|
|
|
|
|
Version 2 and beyond
|
|
====================
|
|
|
|
|
|
- shared memory heap: ``shared ref`` etc. The only hard part in the GC is to
|
|
"stop the world". However, it may be worthwhile to generate explicit
|
|
(or implicit) syncGC() calls in loops. Automatic loop injection seems
|
|
troublesome, but maybe we can come up with a simple heuristic. (All procs
|
|
that `new` shared memory are syncGC() candidates...)
|
|
|
|
- implement/generalize the effect system; checked exceptions
|
|
- const ptr/ref
|
|
|
|
- optional indentation for 'case' statement; hm, keep in mind other syntax
|
|
changes that people want; may turn out to be a bad idea
|
|
|
|
- language change: inheritance should only work with reference types, so that
|
|
the ``type`` field is not needed for objects! --> zero overhead aggregation
|
|
BETTER: ``of`` and safe object conversions only work with ref objects. Same
|
|
for multi methods.
|
|
|
|
- explicit nil types?
|
|
* nil seq[int]
|
|
* nil string
|
|
* nil ref int
|
|
* nil ptr THallo
|
|
* nil proc
|
|
|
|
- better for backwards compatibility: default nilable, but ``not nil``
|
|
notation:
|
|
|
|
type
|
|
PWindow = ref TWindow not nil
|
|
|
|
The problem with ``nil`` is that the language currently relies on it for
|
|
implicit initialization. Initialization is different from assignment. The
|
|
issues can "easily" dealt with by ensuring:
|
|
|
|
var x = myProc() # checks myProc() initializes every pointer explicitely
|
|
|
|
- guards for the 'case' statement; generalized case statement;
|
|
a guard looks like:
|
|
|
|
case x
|
|
of nkStmtList if x.value == 0:
|
|
|
|
a generalized case statement looks like:
|
|
|
|
case x with `=~`
|
|
|
|
- implement ``partial`` pragma for partial evaluation
|