clojure-greece

stathissideris 2019-03-03T09:39:52.024600Z

h hy einai apla python alla me s-expressions? ennow prosthetei kati kai sta semantics ths glwssas h einai akirvws ta idia semantics alla me allo syntax?

salamandra 2019-03-03T10:40:25.026900Z

exw thn entupwsh oti apla mporeis na xrhsimopoieis s-expressions kai den pros8etei kati parapanw! kai opws leei sto documentation: "Hy converts to Python’s own abstract syntax tree" me ena paradeigma tou tupou:

=> [1 2 3]
[1, 2, 3]
=> {"dog" "bark"
... "cat" "meow"}
{'dog': 'bark', 'cat': 'meow'}
=> (, 1 2 3)
(1, 2, 3)
=> #{3 1 2}
{1, 2, 3}
=> 1/2
Fraction(1, 2)

👏 1
pavlosmelissinos 2019-03-03T14:57:28.035200Z

Ούτε εγώ νομίζω να αλλάζει κάτι στα semantics (τουλάχιστον στα βασικά). Στα official docs λένε τα εξής: > We’re still Python. Most of the internals translate 1:1 to Python internals. > Keep in mind we’re not Clojure. We’re not Common Lisp. We’re Homoiconic Python, with extra bits that make sense. Αυτό το "most" δεν κατάφερα να βρω τι δεν συμπεριλαμβάνει...