ah, cool, thanks.  ok, so i wasn't *that* confused.  makes mores sense 
after readig more of the chapter (sorry).  andrew

On Wednesday, 19 February 2014 13:43:06 UTC-3, Stefan Karpinski wrote:
>
> I believe that Jeff changed that to make the code generated by assertions 
> less costly to evaluate in the common case that the assertion isn't 
> triggered. I'm not certain why delaying the string construction to run time 
> does that, but it seems to.
>
>
> On Wed, Feb 19, 2014 at 11:41 AM, andrew cooke <[email protected]<javascript:>
> > 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
>>
>>
>>
>>
>

Reply via email to