This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-03
Channels
- # aws (9)
- # beginners (5)
- # calva (5)
- # cljdoc (7)
- # cljsrn (3)
- # clojure (50)
- # clojure-greece (3)
- # clojure-uk (96)
- # clojurescript (18)
- # community-development (2)
- # core-logic (3)
- # cursive (4)
- # datomic (7)
- # emacs (3)
- # figwheel-main (3)
- # fulcro (5)
- # luminus (4)
- # mount (2)
- # nrepl (11)
- # onyx (6)
- # portkey (1)
- # qlkit (3)
- # re-frame (6)
- # shadow-cljs (33)
- # sql (8)
- # test-check (18)
- # yada (3)
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?
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)
Ούτε εγώ νομίζω να αλλάζει κάτι στα 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" δεν κατάφερα να βρω τι δεν συμπεριλαμβάνει...