Hy
Appearance
Hy | |
---|---|
programming language (en) | |
Bayanai | |
Farawa | 2013 |
Influenced by (en) | Python programming language da Lisp (mul) |
Programming paradigm (en) | imperative programming (en) , procedural programming (en) , object-oriented programming (en) , metaprogramming (en) da generic programming (en) |
Readable file format (en) | Hy source code file (en) |
Writable file format (en) | Hy source code file (en) |
Source code repository URL (en) | https://github.com/hylang/hy |
Software version identifier (en) | 1.0.0, 0.14.0, 0.13.1, 0.13.0, 0.12.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0 da 0.29.0 |
Shafin yanar gizo | hylang.org |
Lasisin haƙƙin mallaka | MIT License (en) |
Copyright status (en) | copyrighted (en) |
Dialect of computer language (en) | Lisp (mul) |
Hy yare ne na yaren shirye-shiryen Lisp wanda aka tsara don yin mu'amala da Python ta hanyar fassara s-maganganu zuwa cikin itacen haɓakar Python (AST). An gabatar da Hy a taron Python (PyCon) shekara ta 2013 na Paul Tagliamonte. Lisp yana ba da damar aiki akan lamba azaman bayanai ( metaprogramming ), don haka ana iya amfani da Hy don rubuta takamaiman harsuna .
Mai kama da taswirar Kawa da Clojure akan injin ƙirar Java (JVM), Hy ana nufin yin aiki azaman madaidaicin Lisp gaban Python. Yana ba da damar ɗakunan karatu na Python, gami da madaidaicin ɗakin karatu, ana shigo da su kuma ana samun su tare da lambar Hy tare da haɗawa [note 1] inda aka canza harsunan biyu na zuwa AST na Python. [note 2]
lambar misali
[gyara sashe | gyara masomin]=> (print "Hy!")
Hy!
=> (defn salutationsnm [name] (print (+ "Hy " name "!")))
=> (salutationsnm "YourName")
Hy YourName!
Duba kuma
[gyara sashe | gyara masomin]- Babban Lisp
- Clojure
- Kawa (aiwatar da tsari)
- CLPython
Bayanan kula
[gyara sashe | gyara masomin]- ↑ The term "compiled" may apply to expressing Hy code in Python's AST or converting that AST into bytecode, the latter being dependent on the specific Python interpreter used and not Hy.
- ↑ Hy is tested on Python 2.7, 3.4 through 3.6, and PyPy.