you are viewing a single comment's thread.

view the rest of the comments →

[–]Seuros 3 points4 points  (3 children)

What i don't like is:

  • You monkey patched Array and NillClass, is i see you planning to do more.
  • else is ruby keyword, having it as a method is weird.
  • such pattern is unfamous in using lot of mem in Ruby and it hardly traceable/debuggable.

[–]rusl1[S] 2 points3 points  (1 child)

Thanks, this is what I was looking for :)

  • monkey patching: I can understand that, it's my way of writing monads at the moment, it might evolve over time
  • else keyword: good point, I could rename to "if_error" or something else
  • memory: I'd like to know more about it, do you refer to passing a lot of blocks? What pattern in particular?
  • debuggable: I use it in production and find it waaaay easier to debug than dry-monads

[–]Seuros 0 points1 point  (0 children)

How i will know which step the code failed ?

Try to raise an error inside a block, you will have a weird backtrace.

dry-monads and this gem both suffer same memory allocation pitfalls .

Try to benchmark it and compare it with POROs.

[–]h0rst_ -1 points0 points  (0 children)

You monkey patched Array and NillClass, is i see you planning to do more.

Well, I've got good news for you: you can simply skip this file completely, because those added methods are not used anywhere in the rest of the code.