Thoughts about "Compile-time types" talk

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat May 18 09:26:18 UTC 2019


On Friday, 17 May 2019 at 19:43:15 UTC, Alex wrote:
> You keep saying that something is not an abstraction then use 
> that abstraction. E.g., oop is a tool used to abstract...

Not sure what you mean. OO abstractions are in your head. 
OOP-language-features are just mechanisms that makes it easier to 
express those abstractions in code.

> Do you realize that a tool itself is an abstraction?

No. Why would it be? The tool itself "just is". You may interpret 
it, that interpretation embodies abstractions.

> Until we can agree on a precise definition of abstraction we 
> will just go in circles.

Seems like it.

> it to you as the reality(but it is still a model))... then, in 
> fact, everything you know is an abstraction... because all your 
> information came through you by sensory data which was 
> abstracted.

Yes, the brain is an abstraction machine.

Current generation compilers are not. There are some attempts in 
that direction, like refactoring engines. E.g. deforesting, where 
you expand a program until it contains no functions, then you 
restructure the program, find similar branches and restructure 
those branches back into functions.

But in general, compilers and common tooling don't do much 
abstraction. Some optimization passes work with abstractions, to 
gain performance, but that is not happening on a semantic level.

> In mathematics, one of the most basic principles is the concept 
> of a point/element... something that is so abstracted as to 
> include everything and nothing at the same time. That singular 
> concept IS what as allowed mathematics to do very real things.

Not sure what you mean by saying that a point includes everything 
and nothing...

Anyway, what the most basic concept is, is a matter of viewpoint. 
Some would say that a set is the most crucial concept.

In general, I don't think such arguments leads anywhere. It is a 
matter of interpretation based on what you are interested in 
expressing.

> Abstractions are not imaginary. A baby is very much an 
> abstraction. What a baby really is far more complex than 
> anything our brains understand. Most people have no clue what a 
> baby is but some simple abstraction of something that whines, 
> shits, and giggles.

The baby is physical matter. Our conceptualization of a baby is 
our individual abstractions of what we have perceived. My 
understanding of what a baby is changed drastically after I 
become a father.

Anyway, how does this  relate to programming languages?

Programming languages are just symbolic machinery.

Those languages makes it possible to encode models.

Those models embody abstractions.


Same as in math.  You can encode ("model") integers like this:

"0" = Zero.
"1" = Successor(Zero).
"2" = Successor(Successor(Zero)).

The right hand side is what we express in the programming 
language to be executed on a machine.

The left hand side is how we map it to the conceptual model (or 
abstraction) that we have in our head.



More information about the Digitalmars-d mailing list