4 ms·
Yes, I completely agree. If you want to teach the user the rules, then you follow the rules. The problem with the Python example is that they DID special-case i
by bvisness 3y ago
Yes, I completely agree. If you want to teach the user the rules, then you follow the rules. The problem with the Python example is that they DID special-case it, but in an unhelpful way.
- thiht 3y agoHow is it unhelpful? It literally tells what to do. Is it too hard to write exit() or press Ctrl+D after having incorrectly entered exit?
- Doxin 3y agoThe special case is actually less a special case than you'd expect. It's "just" a python object that does some slightly funky things when turned into a string[0]. Making plain `exit` actually exit would mean triggering it accidentally could get too easy or would need a special case in the interpreter itself. [0] https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/Python3/_sitebuiltins.py#L13-L26 https://github.com/Source-Python-Dev-Team/Source.Python/blob...