Hi Russel,

There's no existing way to selectively import symbols, but it is an area
that's being actively worked on. Lydia is leading this effort and will be
able to give you more details. Lydia and others on the Chapel team are at
SC this week, but in the meantime you can check out our current
efforts/next steps for namespace control in our latest release notes:

http://chapel.cray.com/releaseNotes/1.12/01-Language.pdf (slides 25-29,
particularly slide 28)

Elliot

>I am likely missing something very simpleŠ
>
>The chapel use statement has the form, for example:
>
>       use Assert;
>
>As with C++ include, or Python, Java, Scala, etc. star import, this
>brings all the symbols from the module imported into the using module
>namespace. This would appear to be uncontrolled namespace pollution
>(which is why star imports  are "evil"). There is also the issue of
>what happens with:
>
>       use X;
>       use Y;
>
>where both X and Y have a feature a. I haven't done the experiment, I
>should have done. 
>
>D solves this with it's import by allowing selective import, very much
>like the Python from imports (but not using star).
>
>       import std.stdio: writeln;
>
>only the named symbols are brought in thereby avoiding all namespace
>pollution. Is there already a Chapel way of getting this right?
>
>
>-- 
>Russel.
>==========================================================================
>===
>Dr Russel Winder      t: +44 20 7585 2200   voip:
>sip:[email protected]
>41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
>London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users
  • using use Russel Winder
    • Re: using use Elliot Ronaghan

Reply via email to