When to Use Macros
Name:
Anonymous
2013-07-10 8:53
http://www.bookshelf.jp/texi/onlisp/onlisp_9.html#SEC61
(defmacro while (test &body body)
`(do ()
((not ,test))
,@body))
There is no way to duplicate the behavior of this macro with a function.
It is true for shitty CL. But it is false for a Lisp that supports fexprs.
Name:
Anonymous
2013-07-10 9:38
fexprs
oh god my sides
Name:
Anonymous
2013-07-10 14:11
Just use lambda calculus.
Name:
Anonymous
2013-07-10 16:03
This thread has been closed and replaced with the following thread:
Subject: How do you pronounce ``fexpr''?
Name:
Email:
1. fax purr
2. feecks purr
3. eff expression (faggot)
4. eff ex-purr
Name:
Anonymous
2013-07-10 16:40
fuks-pi-r
Name:
PERFEKT CODE
2013-07-10 16:55
#define while(cond, expr) \
{for(\
;cond;\
)(expr)}
Name:
Anonymous
2013-07-10 18:05
>>4
Reading it the first time i read "fax purr". But I think "eff ex purr" makes more sense.
Name:
Anonymous
2013-07-10 22:19
Haskell doesn't need shitty hacks like macros. Plus you can write it point-free for improved readability:
import Control.Monad
import Control.Monad.Instances
import Data.Function
while :: Monad m => m Bool -> m a -> m ()
while = fix$join.(.(>>=)).(.(.)).(.(.)).(.(join.)).(.(.((flip when.).))).(.(.(.(>>)))).(.(.flip(.))).flip(.)
Name:
Anonymous
2013-07-10 23:07
>>8
LLLLLLLLLLLEEEEEEEEEEEEELLLLLLL
>LE EGIN POLITE SAGE BECAUSE IRRELEVANT
Name:
Anonymous
2013-07-12 6:14
>>1
How do you do compile-time computation with fexprs?
Name:
Anonymous
2013-07-12 6:38
>>10
Why should I do compile-time computations? Give an example when it is necessary to do that.
Name:
Anonymous
2013-07-12 7:18
>>8
It's like perl with a limited character set.