nimLazy icon indicating copy to clipboard operation
nimLazy copied to clipboard

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

Open timotheecour opened this issue 7 years ago • 2 comments

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

timotheecour avatar Apr 06 '18 23:04 timotheecour

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

petermora avatar Apr 14 '18 21:04 petermora

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:

  • zero overhead compared to optimal hand written code
  • allows arbitrary composition, eg:
stdin.byLine.map!foo.filter!bar.map!(a=>a.splitter(" ")).joiner("\n").writeln

timotheecour avatar Apr 15 '18 01:04 timotheecour