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

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to