Re: Newbie question on generic instantiation

2017-08-23 Thread lkalman
Krux02: Thanks a lot.

Re: Newbie question on generic instantiation

2017-08-23 Thread lkalman
cdome: I see. So you say types in the return value don't bind type variables. [sorry, added "n't" later]

Re: Newbie question on generic instantiation

2017-08-23 Thread Krux02
blah blah blah: type EitherSide = enum ok, err type Either[L, R] = object case kind: EitherSide of ok: mleft: L else: mright: R proc `right=`*[L,R](this: var Either[L, R]; value: R): void = this.kind = err

Re: Nim newbie request/challenge

2017-08-23 Thread jzakiya
I cleaned up the code and added more commments. It should be much easier now to uderstand what/why the code is doing after reading my paper. Here is the gist location of the source code for this version.

Newbie question on generic instantiation

2017-08-23 Thread lkalman
As many other people, I've tried to write an `Either` type for my own purposes (peeking into others' solutions). Here is a piece of code that illustrates the problem I encountered: type EitherSide = enum ok, err type Either[L, R] = ref object case kind: EitherSide

Re: What are you writing using nim? :)

2017-08-23 Thread enthus1ast
* A few Chat systems. One of them is in use every day. So its kinda like Production. * Since NiGui -> guis; one is in production * p2p Toys * bots * everything else Nim has replaced every language (except javascript maybe) that im currently writeing. I dont want to code in other