Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "number" data type #4

Open
sparist opened this issue Nov 24, 2012 · 2 comments
Open

Implement "number" data type #4

sparist opened this issue Nov 24, 2012 · 2 comments
Assignees
Milestone

Comments

@sparist
Copy link
Owner

sparist commented Nov 24, 2012

Implement a Number program type with the following qualities:

@catb0t
Copy link

catb0t commented Feb 19, 2020

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?

@sparist
Copy link
Owner Author

sparist commented Apr 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants