4 ms·
A sufficiently smart editor could show names in front of positional arguments, even if named arguments are not part of the language.
by frou_dh 6y ago
A sufficiently smart editor could show names in front of positional arguments, even if named arguments are not part of the language.
- skohan 6y agoTools are great, but I'm not a fan of the idea of needing special tooling outside of the source code itself in order to be able to understand it. Maybe it's just me, but I would hate to imagine living in a world where my projects might be incomprehensible if I ever lost my .vimrc
- frou_dh 6y agoIn this case it would be a pure value-add, because the fallback is the way everyone can evidently cope with anyway.
- adrianmsmith 6y agoI'm not sure that's entirely true. If a large proportion of people use a more advanced development tool, it sort of becomes indispensable, because people design the software to be edited with the tool, such that it becomes difficult to edit it without the tool. For example if, today, I checked in code like performRequest(request, response, null, null, null) you probably wouldn't consider that good code, as it's not clear what the nulls mean there. Most people today would try to not write code like that. But if everyone was using an editor which displayed the parameter names, then it'd be fine. People would write that code, check it in, and so on. Which would mean that those people without the tool would have to confront such code.
- adrianmsmith 6y agoIntelliJ does this in Java. It only does it for those arguments where the meaning could be unclear. For example, true/false or null.
- anchpop 6y agoRust-analyzer does this, and I find it much more helpful than I thought I would
- frank2 6y agoWhat editor or IDE do you use rust-analyzer with?