Thanks for the reply, guys. I think the part that confused me is that `proc
aProc(): T` will happily return `default(T)` in case the return value is
undefined by the end of its execution, as in, for instance:
proc aProc*(): auto =
if false:
return 1
# returns
I've bumped into the following subtlety and was wondering if anyone could help
me clarify it. Why does the following fails to compile:
proc aProc*(): int =
try:
1
except Exception as exc:
echo "oops"
# Fails with "Error: expression '1' is of type
Thanks @Araq, I'll open an issue then.
Hey, thanks @gabbhack. That is consistent with what I'm observing, and since
sink parameters can be mutated, I end up getting something akin to a var when
the object is big and a "mutable copy" when it's not.
Hello there,
In tracking a bug in our codebase I have bumped into some funny behavior with
sinks while using `refc` (nim 1.16.18 and 2.0.2 on Linux), and was wondering if
I am missing anything silly. This example captures the issue:
type AnObject* = object of RootObj
value*:
Hello there,
In tracking a bug in our codebase I have bumped into some funny behavior with
sink parameters while using refc (nim 1.16.18 and 2.0.2 on Linux), and was
wondering if I am missing anything silly. This example captures the issue:
type AnObject* = object of RootObj
That worked, thanks a lot @Araq!
Hello folks,
I apologize in advance if this is a silly question as I'm new to nim, but I'm
bumping my head against this to no avail for a bit, so here it goes. I have the
following snippet:
import std/tables
type
CallbackRegistry = object
table: Table[string,