On Fri, 2007-01-12 at 11:42 -0800, Erick Tryzelaar wrote:
> skaller wrote:
> > I have just added a first cut of namespaces to felix.
> > It is fairly crude:
> 
> Great! That can be a big help for the standard library. One thing I 
> always wished c++ had for shorthand namespaces is something like:
> 
> namespace foo::bar::baz
> {
>   ...
> }
> 

I guess that is possible to do. Do foo and bar have to exist?
What about baz?

The pro is that is enables a check on spelling, the con is
it forces you to define an ugly tree like:

namespace foo { namespace bar { namespace baz {} } }

first, as a workaround. Note we can also have type variables ..

namespace foo[t] { namespace bar[u] ...

and even constraints:

namespace foo[t] { namespace bar[u where u = t + 1] { ...

and these have to be repeated every time either which way ..
an alternative is not to allow them except on the first
instance, and another is allow different names (but that's
harder because it requires renaming them all for consistency
in the enclosed code ;(

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to