D benchmark code review
Chris Cain
clcain at uncg.edu
Sat Dec 14 14:13:47 PST 2013
On Saturday, 14 December 2013 at 21:47:52 UTC, Ola Fosheim
Grøstad wrote:
> No, if you have strong distinct visual cues the brain does not
> have to reason but you will use the pattern-recognition that
> your brain supports for classifying visual cues in our natural
> environment. The moment you have to think about what an
> identifier means you have started to strain the brain. You are
> being slowed down and will become more tired and make more
> mistakes because you can only "juggle" a limited set of
> symbols/challenges at the same time.
>
> Basically if you should visually "feel" that something is an
> array etc. "int" is so common so that symbol is not read but
> instantly recognised. Colours in an editor might also help.
> Layout helps. Redundant cues help. The basic goal should be
> that the logical structure of the program should be available
> as visual patterns that can be directly detected without
> reasoning, not as indirection (like names with no visual cues)
> that requires interpretation and conscious cognitive effort.
FWIW, I understand some what you're saying. I get your point that
it'd be nice if some visual cue existed that made it obvious that
it was a template instantiation without learning the meaning.
What I don't understand is why you think that such a thing must
exist. I suspect such a thing doesn't exist, but I, obviously,
cannot prove that. Again, I'd love to see your idea of the syntax
you're describing.
From my perspective, I think that the "transparent instant
recognition" thing you describe is learned. It's not unreasonable
to require someone to learn the new syntax and now that I'm
comfortable with D, infix !s (which are actually very distinct
from prefix !s) give me the exact same visual feeling you're
saying they should. I suspect you'd get comfortable with it over
time as well. You should realize that your brain is far more
powerful than you're giving it credit for. It's specifically
designed to adapt over time to the environment and the
pattern-recognition your brain has is more than capable of
adapting to distinguishing the difference between an infix ! and
a prefix !.
That said, I'm not suggesting the syntax is perfect. I'd _still_
like to hear your ideas for better syntaxes ...
More information about the Digitalmars-d
mailing list