Trisha Shetty (Editor)

Hy

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Family
  
Lisp

First appeared
  
2013

Designed by
  
Paul Tagliamonte

Preview release
  
0.11.0

Hy

Paradigm
  
Multi-paradigm: procedural, functional, object-oriented, meta, reflective, generic

Scope
  
lexical, optionally dynamic

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.

Similar to Clojure's mapping of s-expressions onto the JVM, Hy is meant to operate as a transparent Lisp front end to Python's abstract syntax. Because Lisp allows for operating on code as data, Hy can be used to write domain-specific languages. Hy also allows for Python libraries (including the standard library) to be imported and accessed alongside Hy code with a compilation step converting the data structure of both into Python's AST.

Example code

From the language documentation:

References

Hy Wikipedia