What makes macro different from function?

Why is it not possible to do:
foo(e::Expr) = :(&e)
@foo x = x + 5

On Friday, June 3, 2016 at 10:05:46 AM UTC+2, Ford O. wrote:
>
> I think this deserves an own topic.
>
> *You* should post here syntax that looks like duplicate or you think it 
> could use already existing keyword. (mark with* # identical *or *# 
> replacement*)
> Rule of thumb - *the less special syntax the better*.
>
> # identical
> # replace ' , ' with ' ; ' in arrays ?
> [1, 2, 3, 4]
> [1; 2; 3; 4]
>
>
>
> # identical
> # replace ' = ' with ' in ' in for loops ?
> for i = 1:10
> for i in 1:10
>
>
>
>
> # replacement
> # replace ' -> ' with ' = ' in anonymous functions ?
> (a, b, c) -> a + b + c
> (a, b, c) = a + b + c
>

Reply via email to