Jump to content

Hy

Daga Wikipedia, Insakulofidiya ta kyauta.
Hy
programming language (en) Fassara
Bayanai
Farawa 2013
Influenced by (en) Fassara Python programming language da Lisp (mul) Fassara
Programming paradigm (en) Fassara imperative programming (en) Fassara, procedural programming (en) Fassara, object-oriented programming (en) Fassara, metaprogramming (en) Fassara da generic programming (en) Fassara
Readable file format (en) Fassara Hy source code file (en) Fassara
Writable file format (en) Fassara Hy source code file (en) Fassara
Source code repository URL (en) Fassara https://github.com/hylang/hy
Software version identifier (en) Fassara 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) Fassara
Copyright status (en) Fassara copyrighted (en) Fassara
Dialect of computer language (en) Fassara Lisp (mul) Fassara

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!
  • Babban Lisp
  • Clojure
  • Kawa (aiwatar da tsari)
  • CLPython

Bayanan kula

[gyara sashe | gyara masomin]
  1. 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.
  2. Hy is tested on Python 2.7, 3.4 through 3.6, and PyPy.

Hanyoyin waje

[gyara sashe | gyara masomin]