R
Ruli Lupy
Hello, as I am learning Lisp and I like Ruby, I defined some macros in
Lisp,
for example
f.each-line
h.each-key
h.each-value
so you pay the price of having to specify the first argument, for
example the following Lisp code to collect the lines from a file.
(let (lines)
(f.each-line "my.file" line (push "line" lines))
lines)
you obtain some speed up, because f.each-line is a macro and get
translated
into Lisp code.
Do you think the notation is very ugly?
The idea is that you can translate Ruby to Lisp in this way and get
some
more speed but the syntax requires a little more typing.
What do you think of this? (code in comp.lang.lisp)
Lisp,
for example
f.each-line
h.each-key
h.each-value
so you pay the price of having to specify the first argument, for
example the following Lisp code to collect the lines from a file.
(let (lines)
(f.each-line "my.file" line (push "line" lines))
lines)
you obtain some speed up, because f.each-line is a macro and get
translated
into Lisp code.
Do you think the notation is very ugly?
The idea is that you can translate Ruby to Lisp in this way and get
some
more speed but the syntax requires a little more typing.
What do you think of this? (code in comp.lang.lisp)