Nim
Nim copied to clipboard
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, an...
simplified use-case: ```nim import asyncdispatch type R*[P] = object updates*: seq[P] D*[T, P] = ref object ps: seq[P] t: T proc newD*[T, P](ps: seq[P], t: T): D[T, P] = D[T,...
using generics in param initializers gives `undeclared identifier` ### Example ```nim # Error: undeclared identifier: 'T' proc fun1[T](a: T, b = default(T)) = discard fun1(1, 2) # ditto proc foo2(T:...
When a generic type has multiple generic parameters, it's not possible to instantiate types that share the same concrete type for the first generic parameter. ### Example ```nim import hashes,...
While trying to find an alternative to be able to slice with `_` like `a[1, _, 0]` without having to define my own `_` I stumbled upon the following: History:...
A similar starting point to https://github.com/nim-lang/Nim/issues/23784 The following confuses the type inference with the error ``` [...]/nim-2.0.8/lib/system.nim(700, 10) Error: invalid type: 'typeof(matchingBigInt(C))' in this context: 'proc (x: array[0..2, Fp[Fp3prj.C]]): int{.noSideEffect,...
As discussed here: https://forum.nim-lang.org/t/10653
C codegen error when using `Option[lent int]` ### Example ```nim {.experimental: "views".} import options var a = [1, 2, 3, 4] let o: Option[lent int] = some(a[0]) ``` ### Current...
fixes #15533
ref https://github.com/nim-lang/Nim/issues/12340
### Description test.nim: ```nim let sp = @[1, 2] echo sp[1] ``` `$ nim cpp -f test.nim` ``` /Users/niv/.cache/nim/test_d/@mtest.nim.cpp:146:11: warning: array index 1 is past the end of the array...