-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi guys.
Do we have some kind of motivation to set the value of env to nil?
Cause, to my mind, it makes some features of current Ruby usable only in certain ways.
For example - keyword arguments:
Middleware::Builder.new do |b|
b.use -> (a: 1, b: 3) { p a, b }
end.callSo, in order for that snippet to work, I have to pass some value (empty hash) to the #call method.
That snippet would fail due to the fact, that default argument is nil.
The second aspect is about explicitness of what we're trying to achieve. With nil as default value protocol makes unexpected decision for me.
Thanks in advance, waiting for your comments. :)
Metadata
Metadata
Assignees
Labels
No labels