Hacker News new | ask | show | jobs
by NekkoDroid 31 days ago
While I wish every language had them in a way, they do tend to enshrine the argument names in the ABI, so now you can't change those in public APIs. (Main reason I think it shouldn't be part of the ABI is because I think only the necessary things to identify and correctly use a contract should be part of the ABI)

I have been thinking off if there is a way to have it work without enshrining them in the ABI and my only real idea is: allow arbitrary names at the call site (e.g. `my_function(some_var=1)` or `my_function(some_var: 1)`) but don't enforce the naming, just have linting spit out a warning for it if it doesn't match.

1 comments

I don't feel like anyone finds it onerous to not be able to rename functions as a non-breaking change, so it's not obvious to me that this is much of a deal-breaker. If anything, I'd be thrilled for it to force people to spend more time carefully picking the names of their parameters in public APIs so that the autocompletion/documentation popup in my editor has higher quality information!