using works on a module level, not a file level, so you could replace your
macro with a module to do a bulk import


On Fri, Feb 28, 2014 at 7:08 PM, Kevin Squire <kevin.squ...@gmail.com>wrote:

> Okay.  I think that's a little different than what I was asking for, which
> was a block structure within which I have access to a module's exports, but
> external to which I don't.  "using ModuleX" and only works on a file level,
> currently.
>
> Kevin
>
>
> On Fri, Feb 28, 2014 at 4:02 PM, Jameson Nash <vtjn...@gmail.com> wrote:
>
>> Not using, but scope of a method
>>
>>
>> On Friday, February 28, 2014, Kevin Squire <kevin.squ...@gmail.com>
>> wrote:
>>
>>> Thanks Jameson.  But looking in tests, I can't seem to find any examples
>>> which constrain "using" of a module to a let block.  Am I missing something?
>>>
>>> Cheers,
>>>    Kevin
>>>
>>>
>>> On Fri, Feb 28, 2014 at 3:21 PM, Jameson Nash <vtjn...@gmail.com> wrote:
>>>
>>>> Let blocks already do that. See the Julia tests for examples
>>>>
>>>>
>>>> On Friday, February 28, 2014, Kevin Squire <kevin.squ...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>> Think about it more, I think the best way to do this is for each
>>>>>> package to define their own functions (not extending the functions in the
>>>>>> base) with consistent naming. Then in the client code, we will be able 
>>>>>> to do
>>>>>> VML.exp(a1)
>>>>>> IPP.exp(a2)
>>>>>> Yeppp.exp(a3)
>>>>>>
>>>>>> I think what we only have to do is to coordinate the naming across
>>>>>> several packages. So I can easily replace ``Yeppp.add`` with ``VML.add`` 
>>>>>> or
>>>>>> the other way round.
>>>>>>
>>>>>
>>>>> A namespace macro allowing the use of different versions in different
>>>>> regions would be nice.  Maybe something like
>>>>>
>>>>> @using VML begin
>>>>>     ...
>>>>>     y = exp(a1)  # uses VML.exp
>>>>>     ...
>>>>> end
>>>>>
>>>>> @using IPP begin
>>>>>     ...
>>>>>     x = exp(a2)          # uses IPP.exp
>>>>>     y = x - VML.exp(a1)
>>>>>     ...
>>>>> end
>>>>>
>>>>> (Nesting would be challenging...)
>>>>>
>>>>> Cheers,
>>>>>    Kevin
>>>>>
>>>>
>>>
>

Reply via email to