3 ms·
You'd be surprised how many people are against this feature. I thought it'd be a no-brainer when it was proposed in the D community, but there was a lot of push
by skocznymroczny 5y ago
You'd be surprised how many people are against this feature. I thought it'd be a no-brainer when it was proposed in the D community, but there was a lot of pushback against the feature (it's not implemented yet but it was accepted for the language). The main argument was that named arguments will cause your code to break when the arguments are renamed.
- makapuf 5y agoSeems acceptable since names are now part if your interface, and you could object that now you can relax ordering. Whats more interesting is that python has position only and name only arguments, meaning that there are uses for both.
- habibur 5y ago> The main argument was that named arguments will cause your code to break when the arguments are renamed. Here's the counter point : ordered argument list will break if the order is re arranged in the defined function. While for named arguments it doesn't.
- Sebb767 5y ago> Here's the counter point : ordered argument list will break if the order is re arranged in the defined function. While for named arguments it doesn't. Counter-counterpoint: Once you add support for named arguments, your cannot do either, as you don't know which convention the caller uses.
- ledauphin 5y agoin Python you can (and should) define your keyword arguments as keyword-only, for that very reason.