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

Alternative representation of numbers #101

Open
kamil-kielczewski opened this issue Aug 25, 2020 · 0 comments
Open

Alternative representation of numbers #101

kamil-kielczewski opened this issue Aug 25, 2020 · 0 comments

Comments

@kamil-kielczewski
Copy link
Contributor

kamil-kielczewski commented Aug 25, 2020

Hi I found following alternative representation for number 1 based on true => !![](and I construct other numbers using it)

0 => +[]
1 =>+!![]
2 => !![]+!![]
3 => !![]+!![]+!![]
4 => !![]+!![]+!![]+!![]

and so on. Construct new numbers looks trivial (and when you see repesentation of eg. number 4 it is easy to count pattern). In new way, the plus + "means" only adding numbers (cast is implicite - exept 0 and 1 where we use it to cast directly). Also edit number by hand (increasing or decreasing) is easy.

In my opinion this way of write numbers is more easy and redable than old way (which is based on true => !+[])

0 => +[]
1 =>+!+[]
2 => !+[]+!+[]
3 => !+[]+!+[]+!+[]
4 => !+[]+!+[]+!+[]+!+[]

for person who see old representation first time, it is not trivial task to construct number 3,4,... - also when you look on number 4 it is hard to count pattern and recognize it. Here + character has "not easy" meaning. Edit that number by hand (increasing/decreasing) is no easy

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

No branches or pull requests

1 participant