Hy
![]() Cuddles the cuttlefish | |
Paradigm | Multi-paradigm: procedural, functional, object-oriented, meta, reflective, generic |
---|---|
Family | Lisp |
Designed by | Paul Tagliamonte |
First appeared | 2013 |
Preview release |
0.14.0 - Feb 14, 2018
|
Scope | lexical, optionally dynamic |
OS | Cross-platform |
Filename extensions | .hy |
Website |
hylang |
Hy (alternately, Hylang) is a dialect of the Lisp programming language designed to interact with Python by translating expressions into Python's abstract syntax tree (AST). Hy was introduced at PyCon 2013 by Paul Tagliamonte.[1]
Similar to Clojure's and Kawa's mapping of s-expressions onto the JVM,[2] Hy is meant to operate as a transparent Lisp front end to Python's abstract syntax.[3] Because Lisp allows operating on code as data, Hy can be used to write domain-specific languages.[4] Hy also allows Python libraries (including the standard library) to be imported and accessed alongside Hy code with a compilation[note 1] step converting the data structure of both into Python's AST.[note 2][5][6][7]
Example code
From the language documentation:[8]
=> (print "Hy!")
Hy!
=> (defn salutationsnm [name] (print (+ "Hy " name "!")))
=> (salutationsnm "YourName")
Hy YourName!
See also
Notes
References
- ↑ Paul Tagliamonte (2 April 2013). PyCon lightning talk (Speech). PyCon. Santa Clara. Retrieved 2 September 2014.
- ↑ Turto, Tuukka (14 February 2014). "Programming Can Be Fun with Hy". Open Source For You. Retrieved 2 September 2014.
- ↑ Edge, Jake (30 April 2014). "Getting Hy on Python". LWN.net. Retrieved 2 September 2014.
- ↑ Paul Tagliamonte (11 April 2014). Getting Hy on Python: How to implement a Lisp front-end to Python (Speech). PyCon. Montreal. Retrieved 2 September 2014.
- ↑ "Hy Documentation". hylang.org. Retrieved 3 September 2014.
- ↑ Danjou, Julien (26 March 2014). "The AST". The Hacker's Guide to Python. pp. 165–172.
- ↑ Kitchin, John (31 March 2016). "More on Hy and why I think it is a big deal". The Kitchin Research Group. Carnegie Mellon University. Retrieved 19 September 2018.
- ↑ "Quickstart". hylang.org. 15 May 2018. Retrieved 19 September 2018.
External links
1955 | 1960 | 1965 | 1970 | 1975 | 1980 | 1985 | 1990 | 1995 | 2000 | 2005 | 2010 | 2015 | 2018 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lisp 1.5 | Lisp 1.5 | ||||||||||||||||||||
Maclisp | Maclisp | ||||||||||||||||||||
Interlisp | Interlisp | ||||||||||||||||||||
ZetaLisp | Lisp Machine Lisp | ||||||||||||||||||||
Scheme | Scheme | ||||||||||||||||||||
NIL | NIL | ||||||||||||||||||||
Common Lisp | Common Lisp | ||||||||||||||||||||
LeLisp | Le_Lisp | ||||||||||||||||||||
T | T | ||||||||||||||||||||
Emacs Lisp | Emacs Lisp | ||||||||||||||||||||
AutoLISP | AutoLISP | ||||||||||||||||||||
OpenLisp | OpenLisp | ||||||||||||||||||||
PicoLisp | PicoLisp | ||||||||||||||||||||
EuLisp | EuLisp | ||||||||||||||||||||
ISLISP | ISLISP | ||||||||||||||||||||
newLISP | newLISP | ||||||||||||||||||||
Racket | Racket | ||||||||||||||||||||
Guile | GNU Guile | ||||||||||||||||||||
Visual LISP | Visual LISP | ||||||||||||||||||||
Clojure | Clojure | ||||||||||||||||||||
Arc | Arc | ||||||||||||||||||||
LFE | LFE | ||||||||||||||||||||
Hy | Hy |
This article is issued from
Wikipedia.
The text is licensed under Creative Commons - Attribution - Sharealike.
Additional terms may apply for the media files.