These are chat archives for dry-rb/chat

16th
Feb 2017
Piotr Solnica
@solnic
Feb 16 2017 13:44
@flash-gordon so I started working on ASTs for dry-types here dry-rb/dry-types#178
Nikita Shilnikov
@flash-gordon
Feb 16 2017 15:10
@solnic yeah, I see what you're doing there 😀
Piotr Solnica
@solnic
Feb 16 2017 21:19
@flash-gordon this was my intention from the beginning, I’m pretty sure reducing types into simpler forms will be a great feature useful in many places
the only thing that worries me a little is that constructors can’t be represented with pure data :(
as in, if you use an anonymous proc instead of a method-based proc, you can’t represent it as data
in case of class methods it’d be possible, ie [:constructor, [User, :new]]
which can be easily compiled as klass, meth = node + klass.method(meth) :)
Nikita Shilnikov
@flash-gordon
Feb 16 2017 21:24
@solnic well, you can register procs as methods with generated names
Piotr Solnica
@solnic
Feb 16 2017 21:24
hmmm you mean capture them in #constructor and register somewhere?
Nikita Shilnikov
@flash-gordon
Feb 16 2017 21:24
yep
Piotr Solnica
@solnic
Feb 16 2017 21:30
Worth exploring this idea