Old problem with performance

dsimcha dsimcha at yahoo.com
Wed Feb 25 17:36:49 PST 2009


== Quote from Christopher Wright (dhasenan at gmail.com)'s article
> Kagamin wrote:
> > Daniel Keep Wrote:
> >
> >>> You probably don't want D, you want ATS:
> >>> http://www.ats-lang.org/
> >>>
> >>> Bye,
> >>> bearophile
> >> http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats
> >>
> >> Dear god.  I think... I think I'm going to go cry in the corner...
> >
> > Is it common for functional languages to love 1-letter identifiers, I wonder?
> Probably. Mathematicians use "ab" to mean "a multiplied by b", so they
> tend toward single-character identifiers with subscripts. And functional
> languages seem to cater more toward mathematicians.
> I tend to find most examples of the remarkable efficiency of functional
> languages entirely unreadable, partly because of this, and partly
> because they seem fond of using many operators, some in ways that I find
> bizarre.

<Rant>
True.  Conversely, whenever I read something mathy, it always drives me crazy how
hard it is to read something expressed in math notation that is actually quite
intuitive to express in code in a sane language like D (or Python, etc).  If
mathematicians applied their unreadable "style" to mainstream code, they'd be shot
because people would believe they were obfuscating it on purpose.  Single letter
variable names drive me crazy because when I read equations I constantly lose
track of what the variables represent.  Worse yet, when mathematicians run out of
good variable names, they use Greek letters that look almost the same as English
letters, just to make it easier to confuse variable names.  When I do math myself,
my programming side kicks in and I often find myself trying to name variables
descriptively like I would if coding, rather than using one letter like a
mathematician.

Similarly, I find linear algebra impossible to grok largely because some genius
mathematician decided to overload a bunch of operators to mean completely
different things when dealing with matrices than when dealing with scalars.  Heck,
the multiplication operator isn't even commutative.

Frankly, yes, programming/comp sci may arguably be a branch of mathematics, but if
it is, programmers have invented better notation than mathematicians.  The
mathematicians should stay the heck out of all programming notation discussions.
</Rant>



More information about the Digitalmars-d mailing list