I knew you can use keywords as names here but am not quite sure about this. Positional arguments (against my expectations from keyword arguments) don't allow any of these three versions. Should they also work?
The reason why keywords can be used in names is expressiveness on the caller site (not relevant to positional argument), like
validate :something, if: :something_else
association :name, class: "Blah"
It is inconvenient to fetch such argument values, but it allows to create very expressive APIs.
The alternative would be to have—sometimes discussed—“renaming” declarations in signatures, something like
def validate(name, condition if: nil)
With argument named if:
by the caller, but available as a local variable condition
in the method body.