Om icon indicating copy to clipboard operation
Om copied to clipboard

Implement "number" data type

Open sparist opened this issue 13 years ago • 2 comments

Implement a Number program type with the following qualities:

sparist avatar Nov 24 '12 02:11 sparist

how does this integrate with panmorphism? of couse {hello} is like a string, so what will {1} be? it's a program with an operator named 1, so what represents the numeric 1, or vice versa?

catb0t avatar Feb 19 '20 01:02 catb0t

Sorry for the late reply. The idea with panmorphism is that the type resides with the operator, not the operand. So {1}, if passed to a operator that interprets operands as numbers, will be interpreted as the number 1. If passed to an operator that interprets operands as strings, will be interpreted as the string "1". The only way it would be interpreted as an operator called 1 would be if it were passed to an operator that treats operands as operators, or if it were dequoted.

sparist avatar Apr 05 '20 19:04 sparist