These are chat archives for dry-rb/chat

6th
Oct 2016
Sergey Kukunin
@Kukunin
Oct 06 2016 14:08
do you know any name convention about methods that returns monad? We have bang ! for methods that raises exception - it's convenient. How is double bang sign for monads? find_customer!!(customer_id)
how other dynamic languages handle this?
Vladimir Dralo
@vladra
Oct 06 2016 14:36

Hi all! When I'm providing configure block to specific Schema with some option set like this:

configure do
  option :test, -> { Test.new }
end

isn't it supposed to be lazily evaluated? Currently it is evaluated once file with schema definition is required (so as soon as schema is defined)

Nikita Shilnikov
@flash-gordon
Oct 06 2016 15:23
@Kukunin usually monads are about statically typed languages so return type is always available. There is no naming convention in Ruby, also you can't have two bangs in a method name
Sergey Kukunin
@Kukunin
Oct 06 2016 15:49
@flash-gordon yep, but we have dry-monads which is great. I want to use it globally in my project between components, but I predict that pain, when you don't know either method returns old-fashion value/nil or monad
@flash-gordon I didn't know about !! methods limitation =( ! and ? are occupied already =(