4 ms·
Do what I mean, not what I said can be problematic for tools. That being said, the example where the devs left a link to file an issue to beg to restore functio
by 0cf8612b2e1e 3y ago
Do what I mean, not what I said can be problematic for tools. That being said, the example where the devs left a link to file an issue to beg to restore functionality was maddening.
- Arnavion 3y ago"Beg", and "passive aggressive" from TFA, is an unnecessarily emotional interpretation of that sentence. It's perfectly neutral. When they imported `cargo-vendor` into cargo they removed a feature that was not trivial to reimplement, so they asked for an issue to be opened so that they can see if people want it and so that someone can decide to implement it. That message *could* be updated to point to https://github.com/rust-lang/cargo/issues/10310 https://github.com/rust-lang/cargo/issues/10310 instead of asking for new issues to be created or suggesting the old `cargo-vendor`. (The author of TFA already knows about that issue, since they commented on it before they published their article.) (You might say it would've been better to let cargo-vendor remain separate instead of merging it into cargo, but the reason that was done was to ensure it would continue to work with changes to cargo. Indeed that is why the original cargo-vendor does *not* work properly any more.)
- phs318u 3y agoAgreed, but in that case the tool shouldn't be trying to detect what I mean. Why look for 'exit' only so you can print 'no actually, it's exit() dummy'. If you're parsing for it then just bloody do it! Otherwise I'll get a syntax error and realise that 'exit' isn't the right way to exit. And I'll do a quick search myself. But explicitly looking for and detecting my intention and then ignoring it is just dumb.
- slooonz 3y agoNothing is looking for exit. The REPL is calling repr(result) to show the result of the expression to the user. repr(exit) is the string "Use exit() or Ctrl-D (i.e. EOF) to exit". You _really_ don’t want repr(builtin) to have a side-effect like terminating the program. Stop being toxic and patronizing towards open-source developers out of ignorance.
- gizmo 3y agoipython has specifically implemented an Autocall that allows you to exit by typing exit, quit, exit() or quit(). https://ipython.readthedocs.io/en/stable/api/generated/IPython.core.autocall.html#IPython.core.autocall.ExitAutocall https://ipython.readthedocs.io/en/stable/api/generated/IPyth... And repr(exit) also works fine: > In [1]: repr(exit) > Out[1]: '<IPython.core.autocall.ExitAutocall object at 0x102772770>' Maybe don't be so eager to accuse people of ignorance and toxicity.
- emmanueloga_ 3y agoPerhaps a variable `exit = True` or something was defined previously, you don't want to have the language or REPL handle a myriad of possible corner cases, that would be very brittle. But a printing warning or lint-like suggestion is ok and actually useful.
- gizmo 3y agoIt's not brittle. ipython has a special case for exit and quit. See my sibling comment. If you try to assign to exit you get a syntax error. Which is weird, but also fine in practice.