3 ms·
A cool thing about this in Erlang (which I think is the same in Prolog) is that the = operator works almost exactly how you would have expected: it binds the va
by eyelidlessness 4y ago
A cool thing about this in Erlang (which I think is the same in Prolog) is that the = operator works almost exactly how you would have expected: it binds the value but then it asserts the binding’s equality. So once you’ve established x = 7, x = 8 is actually an error! Because you’re right, it doesn’t make sense that at one point x = 7 and later the same x = 8!
- baby 4y agoThat's what I did in my own language[1], no shadowing allowed. [1]: https://github.com/mimoo/noname https://github.com/mimoo/noname