Doug Moen
10/15/2019, 8:44 PMDoug Moen
10/15/2019, 9:35 PMdata Nat = Z | S Nat
. You need this so that you can perform inductive proofs over the natural numbers. You need other numeric types as well (Nat doesn't include negative numbers or fractions).
In systems languages like C, C++ and Rust, you need the full set of numeric types supported by the hardware, including int8, int16, int32 and int64, so that you can write high performance code that optimizes memory consumption and memory access patterns and uses the L1 cache efficiently.
A true wide spectrum language would presumably need to support all of these different kinds of numeric computation, and in each case, do as good a job as more specialized languages designed by domain experts. And that would make the language much more complicated than a domain specific language. For any given task, a DSL is probably a better choice.Doug Moen
10/15/2019, 10:14 PMtbabb
10/15/2019, 10:40 PMtbabb
10/15/2019, 10:45 PMtbabb
10/15/2019, 11:10 PMGarth Goldwater
10/16/2019, 12:02 AMDoug Moen
10/16/2019, 1:30 AMKonrad Hinsen
10/16/2019, 7:37 AMDuncan Cragg
10/16/2019, 8:05 AMuint16
, etc and fiddle with bits. It's very close to the metal. I guess GLSL and OpenCL are also kinds of TSL: any language that is a wrapper for a machine type.
So I'm not interested in a number type that is machine-specific, or that makes things faster. If needed, that speed can be achieved by handing-off or wrapping or clever tricks.
And I am not interested in data Nat = Z | S Nat
as my pos-int number system, because no-one talks of three bananas by saying S S S Z bananas
!
I store numbers as strings, so they can be any length. My challenge of course, is that's not efficient, but I'm on this forum to ask for help with that, amongst other things!Edward de Jong / Beads Project
10/18/2019, 5:16 AMDuncan Cragg
10/18/2019, 9:10 AMshalabh
10/18/2019, 9:35 AMtbabb
11/11/2019, 7:09 PM