-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nim Roadmap 2024 and beyond #543
Comments
I see CPS, is there some further plan for it? No vtable plan? The concepts/interfaces/heterogenous collection of same behavior has been in limbo since 2017. |
There is already So far nothing convinced me that there is a better solution. Converting |
Very exciting! Some questions and notes:
Does this also apply for types? That is more of a pain point in my experience.
Love to see it. What form will this take? metagn's proposal in #527? Are there plans to make use of them when refactoring the compiler AST? (better question: how high of a priority are these?)
Also exciting. With regards to lists, however: any thoughts about laziness? Chaining iterators is currently extremely inefficient, to my knowledge. Are there any plans to rework Also, any plans regarding tooling? |
Curious about the distinction between interfaces and concepts v2 too, because I've never quite seen what makes them distinct. (or really, have a concrete idea of what "interface" entails here: implementations differ so much across languages.) I like the term "interface" better to describe the behavior of concepts v2, but bah... |
We have remove |
@jangko A great point, we should be careful here. |
I never mentioned implicit conversion though. The collection would had to be a ref say |
#527 is definitely close to become a winner. The refactorings do not depend on these better sum types and are prioritized over feature developments. |
Where is the benefit over |
any plans for improving nim views and checkings...? |
We think we can build a good borrow checker based on NIR, yes. But it's not of a particularly high priority. |
Very cool roadmap! Excited for the REPL.
It is not explicit, but will the "REPL" support include LLVM or libgccjit backends? It seems possible (and done with nlvm with ORC), but it is not explicitly stated.
This is just a thought/muse on the language design: it would be a nice feature to have "explicit" blocks: where certain operations such as copies/moves/allocations/etc. must be explicit or is disallowed (this could be extended to you must provide types for vars or other implicit features of the language). For performance-critical code, it would be a good feature to include such that you know exactly when a copy is occurring / memory alloc. This is related to this discussion on allocations within the effect system: perhaps the effect system can be used or an extension on it, but from my understanding, the effect system does not work per variable ( |
"very ambitious" but also very exciting! |
NOTE: This plan covers 2024 and beyond as it is very ambitious.
Version 2.2
C/C++ Backends based on NIR
NIR is Nim's upcoming intermediate language that is sufficiently low level as a compilation target while maintaining all the information required for optimizations, including type based alias analysis. NIR enables more effective evolution of the Nim language as different Nim frontend versions can all target the same NIR layer:
This will be achieved by a set of huge compiler code refactorings, among them:
Upcoming Versions
Language
Upcoming versions will finally address some long standing pain points of Nim:
.cyclic
annotation on all modules that participate in the cycle group. A cycle group is always compiled as a single step producing a single.rod
file for the IC mechanism. Since every module in the cycle has to be annotated the import order cannot have unkown effects for IC.T
should simply match "any" used operation in the generic routine's body. But as soon asT
is constrained by a concept, it's checked thoroughly.case objects
and offer real sum types as a replacement.not nil
the default forref
andptr
.Library
Improve the string implementation to be more flexible with custom memory management. More details in an RFC to come.
Deemphasize the importance of
string
by offering awrite
operation that all collection types support. This makes the libraries more aligned with embedded devices and it makes it easier to write high-performance Nim code.write
(for text streams/files) and astore
(for binary streams/files) operation.read
(for text streams/files) and aload
(for binary streams/files) operation.Change the
seq
type so that it disables the assignment operation that copies. Instead one has to use an explicitcopy
operation. In the vast majority of cases, the compiler can move theseq
however, so that should rarely make a difference. The same principle is applied to any collection type likeTable
orHashSet
that is based onseq
.Rework the collection libraries once again to make use of type checked generics and concepts.
The text was updated successfully, but these errors were encountered: