Currently, there is no way to distinguish between keyword arguments and type annotations.
# Type annotation: parameter x has type String
def foo(x: String)
x
end
# Keyword argument: parameter x has default value "default"
def foo(x: "default")
x
end
Both syntaxes use the same param: value format, making it impossible to differentiate between them.
This requires syntax design review.
Currently, there is no way to distinguish between keyword arguments and type annotations.
Both syntaxes use the same
param: valueformat, making it impossible to differentiate between them.This requires syntax design review.