4 ms·
> Joxa is a small semantically clean, functional lisp. What does "semantically clean" mean?
by dj-wonk 11y ago
> Joxa is a small semantically clean, functional lisp.
What does "semantically clean" mean?
- PuercoPop 11y agoI read that to mean that the semantics don't have edge or ad-hoc cases.
- ams6110 11y agoSuch as?
- PuercoPop 11y agoYes, 'as'[0] in Python is a great example. Idk how establishing an alias could mean deleting anything other than the alias but interacting with the global/nonlocal keyword it can lead to some weird interactions[1]. Also in Python, True and False are a blessed instances of 1 and 0 with their logical operators overidden. So True + True == 2, but True is 1 => False. You can also search #watjs for more example of 'unclean' semantics. [0]: https://docs.python.org/3.4/reference/compound_stmts.html#except https://docs.python.org/3.4/reference/compound_stmts.html#ex... [1]: https://bugs.python.org/issue24321#msg244357 https://bugs.python.org/issue24321#msg244357
- filmor 11y agoTrue == 1 => True. Also, it makes heaps of sense to have the identity `1 if boolean else 0` baked into the language.
- berdario 11y agoWhile I agree on the pragmatic value of it, and I think this is a pretty minor blemish in the semantics of Python. You can easily have booleans as a completely different type, and yet avoid stuff like: `1 if boolean else 0`... In Haskell, for example, `True + True` and `True == 1` are compile errors (unless you defined wacky Num instances), and the boolean/int "identity" is simply handled by `fromEnum` (which works on any Enum, not only Bool) 1 == fromEnum True 0 == fromEnum False
- cyberlync 11y agoThats exactly what it means. Its has a very simple syntax that is a nice mix of the semantics of Core Erlang laid on very straightforward and minimal lisp. The goal was to build up more semantically complex structures in the language itself. In effect, Joxa is designed as a platform for language design more then a language in and of itself. Now I just need to find the time to get back to it.
- rvirding 11y agoIf you replace "Joxa" with "LFE" here you would get a good description of LFE.