Re: Why do custom types need to be reference counted objects for dynamic dispatch to work.

2017-01-05 Thread Jehan
Note that `ref` stands for "reference", not "reference counting". The behavior will not differ between the reference counting and the mark and sweep GC. You also do not strictly require `ref` for polymorphism to work, though this is the most common use case; any kind of pointer (`ref`, `ptr`,

Re: Please , can we stop spams?

2017-01-05 Thread Araq
The forum has been updated. New users are now moderated. It's also much faster now.

Re: Maybe a bug about built-in string to cstring converter

2017-01-05 Thread xomachine
As far as I know, cstring is just a pointer to the char's array. The inner representation of the string type contains such kind of array, so the converter just passed the array pointer from the inner representation without any nil-checks to your test procedure. Probably the converter should

Maybe a bug about built-in string to cstring converter

2017-01-05 Thread Ward
proc test(x: cstring) = echo cast[int](x) var str: string = nil test(nil) # output 0 -> correct test(str) # output 8 ?? I think this should be a bug. I use "Nim Compiler Version 0.15.2 (2016-10-23) [Windows: i386]"

Re: Seq with custom fields

2017-01-05 Thread Araq
Cross module inline procs are inlined across modules without link time optimization, the Nim compiler duplicates the inline procs in the generated C code.