no that can't be right or $ex would be evaluated. sorry - confused...
On Wednesday, 19 February 2014 13:45:08 UTC-3, andrew cooke wrote: > > ah, no. it forces evaluation at compile time, i think. > > On Wednesday, 19 February 2014 13:41:15 UTC-3, andrew cooke wrote: >> >> according to >> http://julia.readthedocs.org/en/latest/manual/metaprogramming/ @assert >> is defined as: >> >> macro assert(ex) >> :($ex ? nothing : error("Assertion failed: ", $(string(ex))))end >> >> and i am wondering why there is a $(...) around the call to string. is this >> to delay evaluation? >> if so, why? >> >> thanks, >> andrew >> >> >> >>
