petermora / nimLazy

Iterator library for Nim.
MIT License
38 stars 3 forks source link

lazy.nim(924, 19) Error: cannot instantiate: 'S' #4

Open timotheecour opened 6 years ago

timotheecour commented 6 years ago

nim c -o:app -r $git_clone_D/nim/nimLazy/lazy.nim lazy.nim(924, 19) Error: cannot instantiate: 'S' nim --version Nim Compiler Version 0.18.0 [MacOSX: amd64] Copyright (c) 2006-2018 by Andreas Rumpf

active boot switches: -d:release -d:useLinenoise

petermora commented 6 years ago

Hi, I haven't used Nim for 2 years. Would this code be useful for you? (I'm just trying to get more info.) Peter

timotheecour commented 6 years ago

I'm looking for the best possible approach to have D-like range behavior (cf https://github.com/alehander42/zero-functional/issues/21 for related packages), so I was trying to evaluate yours. Also I'm experimenting with a design much closer to the way D approaches ranges (via objects that have empty, front, popFront procs/templates) and have some initial results on that but also facing compilation speed issues (will post code once a bit more ready).

my ideal design is same as achieved with D's ranges: