Can you have required keyword arguments in javascript or python? Is this a common feature of programming languages, or is it new and rare? They would be analogous to this implementation of keyword arguments in Ruby in Ruby 2.1+
def obvious_total(subtotal:, tax:, discount:)
subtotal + tax - discount
end
obvious_total(subtotal: 100, tax: 10, discount: 5) # => 105
(The above example comes directly from https://robots.thoughtbot.com/ruby-2-keyword-arguments)
I'd like to know because I was really interested in the perspective of the author of the above page. He basically suggests that required keyword arguments would help coders understand each other's code later on down the line, while only sacrificing succintness. Personally, I think that that is a decent trade off, and I wonder if it is commonly practiced or not.
It is quite a common occurrence, I think, to find poorly documented code, and to wonder which argument does what. That's why I always try to put good and succinct instructions at my methods. I could be crazy and this is a completely unnecessary feature, after all, I'm just a newbie coder who scripts stuff when he gets lazy.