I'm not sure, but your example as given does not compile.
Quelklef and I discussed this a bit on IRC. I have mixed feelings about it. But
I do think it is worth making an RFC for.
The most well known example of a similar feature that I have seen is Racket,
which lets you have module level reader macros. (@Quelklef, I was finally able
to find the name
> I think it's a mistake to chase every feature it has when we are so early to
> a 1.0 release
I don't know what Araq's plans are, but I never thought that this was a 1.0
feature? I thought we were just discussing the idea as a valid RFC to put on
the roadmap. I agree that getting 1.0 finished
Ah, so _strategy_ could never be _static_ but you would select it at will by
passing a _SpecialisedTA /B_ to fill. Took a while, but I think I get it now :o)
> I am merely stating my ignorance here :-).
This is Nim, so that's what we're all doing here to a degree, with a few
exceptions.
I have tagged and deployed NimForum 2.0.1 yesterday. This is a very minor
release. The two main improvements are:
* The forum now runs on Jester 0.4.0 and HttpBeast 0.2.0.
* User sessions are no longer tied to your IP address. So for those of us on
the go, or with an ISP that likes to
I do want Nim to compete with Rust. I think it's a mistake to chase every
feature it has when we are so early to a 1.0 release. Even if Nim gets rid of
GC and exceptions, Rust will have had a large lead on Nim. We need to
distinguish ourselves from Rust, not copy its every feature.
By chasing
`when` is resolved at compile-time, at run-time you get just one of two
branches, which already knows what field to read from JSON and where to put it.
So if you explicitly pass strategy (type disambiguator) as compile-time known
(static) argument, a proc with `when` is the simplest and most
Hi @gemath. The types are known at compile time, but they are being populated
by a JSON file at runtime, so doIt would be called multiple times at runtime
and will take in a JsonNode.
I am not challenging your assertion about compile times, so the above might
still be possible? I am merely
> runtime dispatch uses dispatch trees which are more performant than the more
> common indirect branches
Don't quite understand your decision: the types seem to be known at compile
time and nothing is faster than compile time dispatch. So, the solution by
@mratsim should be fine. Btw., if you
Illegal storage access, is equivalent to nil pointer dereference in Nim, it is
not an exception.
Checking the code of writeData:
proc writeData*(s, unused: Stream, buffer: pointer,
bufLen: int) {.deprecated.} =
## low level proc that writes an untyped
Yeah, we really need to fix that. :-)
11 matches
Mail list logo