Author Topic: Programming as Mathematics  (Read 7260 times)

0 Members and 1 Guest are viewing this topic.

Nation of One

  • { }
  • { ∅, { ∅ } }
  • Posts: 4766
  • Life teaches me not to want it.
    • What Now?
Re: Programming as Mathematics
« Reply #15 on: November 02, 2019, 01:35:34 pm »
From Stroustrup's "Programming:  Principles and Practice Using C++", c.2014:

What are types good for?

Types are good for directly representing ideas into code.

________________________________________________________

An aside:   I am not sure if Bjarne Stroustrup realizes how profound this statement is to a man with deep philosophical tendencies.   This statement, that types are good for directly representing ideas into code, could be a mantra, and becomes even deeper when applied to mathematical phenomena.

Consider the user-defined type, the class Fraction.    Developing this type helps me to express the "idea," the Qualita Occulta ?, of rational numbers and how to "operate" with them as "numerical structures" consisting of defined members, specifically, two "Integers," the Numerator and the Denominator, and on and on, et cetera.
« Last Edit: November 02, 2019, 05:18:21 pm by mike »
Things They Will Never Tell YouArthur Schopenhauer has been the most radical and defiant of all troublemakers.

Gorticide @ Nothing that is so, is so DOT edu

~ Tabak und Kaffee Süchtigen ~