So begin blocks can introduce a scope, they just don't by default?

In your `local t = 1; t` example: what, then, is the scope of t?


On Monday, 8 December 2014 16:56:24 UTC, Isaiah wrote:
>
> tmp is declared local to the begin blocks
> if that sounds odd (it did to me at first), try typing `local t = 1; t`)
>
> On Mon, Dec 8, 2014 at 6:11 AM, Simon Byrne <simon...@gmail.com 
> <javascript:>> wrote:
>
>> According to the docs 
>> <http://julia.readthedocs.org/en/latest/manual/variables-and-scoping/>, 
>> begin blocks do not introduce new scope blocks. But this block:
>>
>>
>> https://github.com/JuliaLang/julia/blob/1b9041ce2919f2976ec726372b49201c887398d7/base/string.jl#L1601-L1618
>>
>> *does* seem to introduce a new scope (i.e. if I type Base.tmp at the 
>> REPL, I get an error). What am I missing here?
>>
>> Simon
>>
>
>

Reply via email to