4 ms·
My impression is the goal of this library is to make it a little cleaner than the builder pattern because you don't need the `.send()` at the end. Arguably, it'
by alangpierce 9y ago
My impression is the goal of this library is to make it a little cleaner than the builder pattern because you don't need the `.send()` at the end. Arguably, it's nice to make the syntax a little more concise if the library is there to hide all of the complicated details from you.
That said, I get uneasy when reading code like the example
send('hello everyone!').to('friends').except('john');
since it doesn't follow my mental model of how programs execute. It's shorter than the builder pattern, but, at least to me, less understandable because there's more magic going on.
- bryanrasmussen 9y agoI liked it because it reminded me of Ruby's more English like syntax, however someone else made the same comment where I work about it being a source of possible confusion so that is probably true. I guess otherwise it would need to be something like send('hello everyone').to('friends', 'John'); but now you don't understand what 'John' does unless you read the code - which,I know, realistically people don't always make their methods match the names so you don't really know that except('John') does what you might assume until you read it as well. But in a theoretical world that was as we would like it to be you could reason from the method name to what the method actually does.