2012/11/11 Patrick E. <zeno...@gmail.com>

> Hi,
>
> > use My\Math
> > Math\sin();
>
> very intuitive.
> And it would be a bit like Python Modules,
> where you import symbols (including "global" variables of the module)
> of modules:
>
> import math
> print math.sin(math.pi)
>
> Const autoload would also make sense,
> but results in different Coding styles (personality driven),
> Module Consts vs. Class Consts :
>
> use My\Math;
> Math\sin(Math\PI);
>
> // class constants:
>
> use My\Math;
> Math\sin(Math\M::PI);
>

For something like PI I don't know, why it should be in a seperate class
anyway (instead of a namespace-constant). However, I guess you would still
"import" class "directly" anyway, what will look more like

use My\Math as math; // Lowercase, to make it obvious, that this is NOT a
class
use My\Math\Constant;

math\sin(Constant::PI);


In my opinion current coding styles are not affected either, because right
now I can't remember one, that covers the "namespaced functions"-topic.
Everything else could (and should) stay the same as before.


>
>
> --
> best regards,
> Patrick Engel
>



-- 
github.com/KingCrunch

Reply via email to