Kodi Arfer 14fddbe6c3 Give require the same features as import (#1142)
Give `require` the same features as `import`

You can now do (require foo), (require [foo [a b c]]), (require [foo [*]]), and (require [foo :as bar]). The first and last forms get you macros named foo.a, foo.b, etc. or bar.a, bar.b, etc., respectively. The second form only gets the macros in the list.

Implements #1118 and perhaps partly addresses #277.

N.B. The new meaning of (require foo) will cause all existing code that uses macros to break. Simply replace these forms with (require [foo [*]]) to get your code working again.

There's a bit of a hack involved in the forms (require foo) or (require [foo :as bar]). When you call (foo.a ...) or (bar.a ...), Hy doesn't actually look inside modules. Instead, these (require ...) forms give the macros names that have periods in them, which happens to work fine with the way Hy finds and interprets macro calls.

* Make `require` syntax stricter and add tests

* Update documentation for `require`

* Documentation wording improvements

* Allow :as in `require` name lists
2016-11-03 09:35:58 +02:00
2014-04-30 01:51:21 +03:00
2015-10-01 10:08:04 +02:00
2015-10-01 10:08:04 +02:00
2014-10-06 13:37:51 -06:00
2014-09-08 14:56:04 +02:00
2016-05-16 14:57:56 -07:00
2016-10-09 13:01:08 +02:00
2014-11-22 10:28:31 -05:00
2013-04-05 20:04:36 -04:00
2016-07-01 16:44:12 +02:00
2014-03-18 10:33:10 +02:00

Hy

Build Status Downloads Version Coverage Status

XKCD #224

Lisp and Python should love each other. Let's make it happen. Try it.

Hylarious Hacks

OK, so, why?

Well. Python is awesome. So awesome, that we have so many tools to alter the language in a core way, but we never use them.

Why?

Well, I wrote Hy to help people realize one thing about Python:

It's really awesome.

Oh, and lisps are neat.

Cuddles the Hacker

(fan art from the one and only doctormo)

Project

Description
Hy fork
Readme 6.1 MiB
Languages
Python 50.7%
Hy 41.5%
reStructuredText 7.1%
Batchfile 0.4%
Makefile 0.3%