Follow-up post explaining research rationale

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sun May 15 12:56:39 PDT 2016


On Sunday, 15 May 2016 at 17:09:56 UTC, Joe Duarte wrote:
> On Sunday, 15 May 2016 at 10:52:47 UTC, Timon Gehr wrote:
>> On 15.05.2016 05:02, Joe Duarte wrote:
>>> Type systems are quite arbitrary and primitive
>>
>> That may apply to the popular ones.
>>
>>> -- we could've moved to  real-world types
>>
>> The "real world" is complex and there are bound to be some 
>> modeling limitations. I don't really see what "real-world" 
>> type is supposed to mean.
>>
>>> a long time ago, which would be much safer and a hell
>>> of a lot more productive.
>>
>> How would that work/what's the difference?
>
> Here's what I think is the first big exploration of a 
> real-world type system: 
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.397

Well, C++14 provides the chrono std-library for the 
time-dimension with proper suffixes for literals for hours, 
minutes, seconds etc so yo can write 1.5h, 90.0min or 5400.0s and 
get the typing and the scaling right.

You can also implement your own literals with a custom suffix for 
various units e.g. 12_km, 44_miles and they will yield the 
correct custom type.

Of course, this is rather simple compared to the goals within 
deductive databases/ontology/AI research.



More information about the Digitalmars-d mailing list