4 ms·
> But it does neither. It acknowledges your intent and refuses it. It’s saying “I know exactly what you want to do, but you’re doing it wrong. Do it right next
by prepend 3y ago
> But it does neither. It acknowledges your intent and refuses it. It’s saying “I know exactly what you want to do, but you’re doing it wrong. Do it right next time.”
Programming languages follow rules and programmers should follow the rules. Just because mistake is common doesn’t mean the language should incorporate it into its functioning. That makes inconsistent behavior and is a pain in the long run because instead of learning and following logic, programmers have to guess what’s a common enough error that the language compensates. And over time the language drifts and is hard to work with.
It seems easier to me to just suck it up and learn the right way to do things in a language.
- williamtrask 3y ago> “Just because mistake is common” A good example of why having a language that is squishy to common errors is valuable. I still understood your point even though it’s grammar wouldn’t compile.
- prepend 3y agoHumans aren’t programming languages. So programming languages don’t need to do everything humans do. It’s ok for things to be different. It’s cool that I understood what you meant when you said “it’s grammar wouldn’t compile” but I would definitely expect a compiler to barf unless you entered “its grammar.”
- shpx 3y agoProgrammers just haven't been able to make computers as good at language as humans are at language because they're not good enough at their jobs. There's no inherent reason that programming language statements need to perfectly follow regular grammars and have exactly defined vocabularies (functions) that compile to ASTs, etc. that's just the highest level of language technology we've invented. It has essentially no error recovery mechanisms because it's hard/tedious and error is hard to model using logic. Being frustrated that this is the case is expressing an underserved need in the market. You're aware of the limitations and have grown to be okay with them because otherwise you'd probably hate programming, but that doesn't mean we should all always be okay with them forever.
- deleted 3y ago[deleted]
- steve_gh 3y agoPostel's law (https://en.m.wikipedia.org/wiki/Robustness_principle https://en.m.wikipedia.org/wiki/Robustness_principle) would seem relevant here: "Be liberal in what you accept, and conservative in what you send"
- wvenable 3y agoWhat's weird is that there is a special exception for this -- it's literally not following it's own rules to tell you that you're not following the rules!!
- prepend 3y agoI think the exception follows the logic of giving tips and hints to make fixing it easier. So the intent is to create correct behavior, not enable incorrect behavior. This follows its internal rules.
- 8note 3y agoI think it's quite reminiscent of car infrastructure, in that you can know all the rules, but primarily you're interacting with other people who have varying knowledge and skill with the rules. The dutch make a strong case for the rules to follow what the people do naturally, and using design to make the correct thing the easiest one, rather than presenting a stiff ruleset and expecting people to contort themselves around it. I don't know what a dutch programming language looks like, but i think it'd be better than what we've got now in terms of all readers and writers getting the same understanding of the same code
- throwaway81523 3y ago> I don't know what a dutch programming language looks like Python? Heh. (Not Pascal: Wirth is Swiss). And of course, Dijkstra was involved with Algol 60.
- jmopp 3y agoFrom the Zen of Python: There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch.
- myaccountonhn 3y agoI agree with the importance of designing things after how people act naturally, but with UX I think we sometimes go overboard with this mentality. Sometimes it feels like you can never expect people to have some base level of knowledge (or for heavens sake, make them learn something new), which makes it so that you remove vital features, change syntax to accompany what people are used to or change the architecture in a way that is more easily understood but hurts in a long run. There is a balance to struck.
- makeitdouble 3y agoI think it's more a communication problem than a question of rules or behavior (which is why I also disagree with the article's take) People react strongly to "I'm Sorry Dave, I'm Afraid I Can't Do That" types of messages, and the exit command one is pretty close to that. If instead they went for a more question like "unrecognized command. Did you mean 'exit()' ?" type of prompt users would react in a milder way. In particular, choosing an imperative tone in help messages is probably not optimal.