nim-chronos icon indicating copy to clipboard operation
nim-chronos copied to clipboard

`results.?` compatibity

Open arnetheduck opened this issue 1 year ago • 1 comments

This PR uses the facilities provided in https://github.com/status-im/nim-stew/pull/134 to support ? in async proc's.

arnetheduck avatar Jul 22 '22 08:07 arnetheduck

Besides the alternative I proposed here and will test out when I find some time, a cooler solution would be to open an RFC on the Nim specs to allow:

proc hey: string =
  template `return`(i: int) = return $i
  return 5

to work. It could replace the whole "rewritting return" sheningan, fix the issue with results in a nice generic way, and doesn't seem stupid to me

Do you think it would make sense to open such RFC? (Obviously, it would take a long time, so we'll need another temporary solution anyway)

Menduist avatar Jul 29 '22 11:07 Menduist

ci fails are due to nimble, not the changes

arnetheduck avatar Jun 06 '23 16:06 arnetheduck

https://github.com/arnetheduck/nim-results/pull/37 is one more entry in the ? compatibility line which works out-of-the-box now that #449 is merged

arnetheduck avatar Oct 16 '23 09:10 arnetheduck

obsoleted by https://github.com/arnetheduck/nim-results/pull/37

arnetheduck avatar Dec 28 '23 15:12 arnetheduck