You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RFCs all typically refer to it as "parameters". Even Rails tends to use parameters, as in ActionDispatch::Request#query_parameters and ActionDispatch::Request#request_parameters. I'm sure there are other examples. A cursory glance at params vs parameters shows that parameters is more commonly used.
Even in Rack itself, we have mixed usage.
I'd like to propose we try to make this part of the interface more consistent.
In regards to general consistency, and something that is probably hard to change, parameters or formal parameters normally refers to the variables in a function/method definition, not the actual values, which are typically referred to as arguments. It's interesting that we've somehow managed to blur the lines here w.r.t. web technology/terminology. In that way of thinking, for example, I'd say request.arguments => [1, "John", 20] and request.parameters => [:user_id, :name, :age] would be a more appropriate taxonomy.
As a separate issue, maybe we can talk about Rack::Request#params, Rack::Request#[] and the fact that Rack::Request#get_header doesn't actually return headers and is inconsistent with other parts of Rack. It might be good to figure out a bigger "plan of attack" for the evolution of Rack (or not).
The text was updated successfully, but these errors were encountered:
RFCs all typically refer to it as "parameters". Even Rails tends to use
parameters
, as inActionDispatch::Request#query_parameters
andActionDispatch::Request#request_parameters
. I'm sure there are other examples. A cursory glance atparams
vsparameters
shows thatparameters
is more commonly used.Even in Rack itself, we have mixed usage.
I'd like to propose we try to make this part of the interface more consistent.
In regards to general consistency, and something that is probably hard to change,
parameters
orformal parameters
normally refers to the variables in a function/method definition, not the actual values, which are typically referred to asarguments
. It's interesting that we've somehow managed to blur the lines here w.r.t. web technology/terminology. In that way of thinking, for example, I'd sayrequest.arguments => [1, "John", 20]
andrequest.parameters => [:user_id, :name, :age]
would be a more appropriate taxonomy.As a separate issue, maybe we can talk about
Rack::Request#params
,Rack::Request#[]
and the fact thatRack::Request#get_header
doesn't actually return headers and is inconsistent with other parts of Rack. It might be good to figure out a bigger "plan of attack" for the evolution of Rack (or not).The text was updated successfully, but these errors were encountered: