Worst ideas/features in programming lang
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Oct 27 18:35:24 UTC 2021
On Wednesday, 27 October 2021 at 17:41:40 UTC, Basile B. wrote:
> I'm a bit surprised by the results of these studies. I'd say
> that what people prefer actually does not matter because they
> dont necessarily have in mind the consistency criterion
> mentioned earlier.
My phrasing may have been a bit imprecise. The students were
asked to rank the phrases as to how well they thought they
matched up to the concept. So, basically, how intuitive they
found them. They had C++ experience.
> (side note: there's actually a proglang, Quorum, that has part
> of the design bassed on surveys !)
Yes, I found some papers on that one too! It appears to have been
developed for blind programmers (?!), but has been adopted more
widely in teaching.
I also found a paper that created and played melodies when
debugging programs so that you could hear how the program
executed. I assume this means that you could hear when a loop was
exited, a branch was taken etc.
Surprising things to be found when looking around! Unfortunately
there has been very few controlled usability studies of
programming language designs... I found a presentation that
claimed there has only been 22 studies (over 50 years?).
> What's important is that the compiler should prevent reasoning
> errors, just like when AssignExp is rejected if used as
> condition.
I think there are many aspects to focus on. I'll keep it short
here. Some dimensions I think are relevant:
* learnability: how intuitive and natural is the syntax?
* retention: how easy is it to remember what you have learned
(consistency, mnemonics etc)?
* skimmable: how good impression of what goes on do you get by
skim-reading?
* legibility: how quickly do you get a correct understanding of
what goes on when reading?
* error prevention: is the syntax resistant to typos that go
undetected?
Clearly "and"/"or" is more resistant to typos than "&&"/"||", and
also more skimmable with high learnability/retention (especially
for "or").
But, if you don't allow implicit conversion to/from bool then the
compilation stage should catch most such typos in the type
system. So the impact of syntax also depends on language
semantics.
More information about the Digitalmars-d
mailing list