food for thought - swift 5 released - bottom types, string interpolation, and stuff.
Nick Sabalausky (Abscissa)
SeeWebsiteToContactMe at semitwist.com
Sat Apr 13 04:15:02 UTC 2019
On 4/12/19 7:03 AM, Walter Bright wrote:
> On 4/11/2019 11:14 PM, Nick Sabalausky (Abscissa) wrote:
>> But here's the problem: That's your superpower. It's enviable, it's
>> impressive, but it's absolutely NOT shared by the vast majority of
>> GOOD programmers, let alone rank-and-file ones.
>
> Knowing what (x & 1) is is a superpower?
No. Like I said, I know what it is too, so do tons of programmers. But
there's a big difference between possessing that knowledge vs having it
internalized at a glance so deeply that a mere glace mentally registers
as "is this an odd/even number". The former is common, and such people
have to do a mental translation step (even if they're not always aware
they're doing it). The latter, where no mental translation is even
needed, does occur, but it's not especially common, even among good
programmers.
Naturally I can't say this for sure, but based on your arguments, it
sounds like you may very well be in the latter, uncommon category,
meaning you would posses the genuine benefit of lacking a mental
distinction between "& 1" and "evenness". In effect, it's mean you see
straight through to the core truth (analogous to rain man's counting,
hence the allusion to "superpowers"). If so, then that's fantastic, and
I can certainly understand why you would balk at an isOdd/etc. It's just
like how I would balk at anyone wrapping "x++" syntax with a
"x.increment()" function. Like most with C-like experience, I look at
"x++" and I instinctually "see" an increment, thus abstracting it would
be pointless.
But understand that such lack of mental distinction between "& 1" and
"evenness" isn't common, even among good programmers with low-level
experience. And that distinction is exactly what high-level languages
are all about: Not mixing high-level intent from from mechanical
implementation in order to cope with the human brain's difficulty at
handling different levels of abstraction simultaneously.
If for you, they're the same level of abstraction, that's great. For
most, it isn't.
More information about the Digitalmars-d
mailing list