[spirit2] namespaces

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[spirit2] namespaces

Joel de Guzman-2
Hi,

namespaces...

I find it a bit cumbersome to use lots of components in spirit2
placed in different namespaces. For example, in what namespace is
"rule" in? How about "unused"? "lit"? etc. Many times, it's not clear
where one component lives.

I do like the way we have ascii, iso8859_1 and soon unicode.
But others are rather, ehm, placed adhoc-y. For example, while
arg_names::_1 is ok, arg_names::_val and arg_names::_a are not!
Those are not arguments! I want to clean these up, so be prepared
for namespace name changes.

Also, I'm not quite happy with the situation where the user
needs to refer to the docs to know which namespace a particular
component lives in. So... I am really contemplating on hoisting
all public components used by a particular module, except the
character-set related components, in the namaspaces qi, karma,
or lex. For example:

namespace boost { namespace spirit { namespace qi
{
     using boost::spirit::int_;
}}}

That way, when using Qi, for example, you can use the boost::spirit::qi
namespace exclusively and still get the right components. No need to
memorize which components live in which namespace.

I'm inclined to do this unless there are objections. Your thoughts?

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

Matthias Vallentin-3
On Tue, Dec 02, 2008 at 10:10:59AM +0800, Joel de Guzman wrote:
> Also, I'm not quite happy with the situation where the user
> needs to refer to the docs to know which namespace a particular
> component lives in.

I found myself many times in this situation.

> namespace boost { namespace spirit { namespace qi
> {
>      using boost::spirit::int_;
> }}}

This looks clean and helpful, from a usability perspective. My vote goes
for it.

   Matthias
--
Matthias Vallentin
[hidden email]
http://matthias.vallentin.cc

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

CARL BARRON-3
In reply to this post by Joel de Guzman-2

On Dec 1, 2008, at 9:10 PM, Joel de Guzman wrote:

> Hi,
>
> namespaces...
>
> I find it a bit cumbersome to use lots of components in spirit2
> placed in different namespaces. For example, in what namespace is
> "rule" in? How about "unused"? "lit"? etc. Many times, it's not clear
> where one component lives.
>
> I do like the way we have ascii, iso8859_1 and soon unicode.
> But others are rather, ehm, placed adhoc-y. For example, while
> arg_names::_1 is ok, arg_names::_val and arg_names::_a are not!
> Those are not arguments! I want to clean these up, so be prepared
> for namespace name changes.
>
> Also, I'm not quite happy with the situation where the user
> needs to refer to the docs to know which namespace a particular
> component lives in. So... I am really contemplating on hoisting
> all public components used by a particular module, except the
> character-set related components, in the namaspaces qi, karma,
> or lex. For example:
>
> namespace boost { namespace spirit { namespace qi
> {
>     using boost::spirit::int_;
> }}}
>
> That way, when using Qi, for example, you can use the  
> boost::spirit::qi
> namespace exclusively and still get the right components. No need to
> memorize which components live in which namespace.
>
> I'm inclined to do this unless there are objections. Your thoughts?

great idea

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

OvermindDL1
It actually matters not to me.  I program in Visual Studio 2k5 with
the Visual Assist addon (absolutely addicted to it), regardless of
what platform I compile on, and it lets me know where things are
located so I never need to go looking (I am still looking for
something for Eclipse that does even half of what Visual Assist
does... nothing was even close last I checked a year ago...).  If you
have a good enough IDE (like with Visual Assist), then it makes up for
API oddities quite well without ever noticing.  :)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

Joel de Guzman-2
OvermindDL1 wrote:
> It actually matters not to me.  I program in Visual Studio 2k5 with
> the Visual Assist addon (absolutely addicted to it), regardless of
> what platform I compile on, and it lets me know where things are
> located so I never need to go looking (I am still looking for
> something for Eclipse that does even half of what Visual Assist
> does... nothing was even close last I checked a year ago...).  If you
> have a good enough IDE (like with Visual Assist), then it makes up for
> API oddities quite well without ever noticing.  :)

Is it at least fair to say that for us poor souls without such a
utility, such an approach I outlined is good :-)

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

OvermindDL1
On Tue, Dec 2, 2008 at 7:05 AM, Joel de Guzman
<[hidden email]> wrote:
> Is it at least fair to say that for us poor souls without such a
> utility, such an approach I outlined is good :-)

If you all see a need for it then go for it. :P
Eclipse (or insert whatever is your preferred dev environment) really
needs something like Visual Assist; for C++ programming the difference
is night and day...

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

Joel de Guzman-2
OvermindDL1 wrote:
> On Tue, Dec 2, 2008 at 7:05 AM, Joel de Guzman
> <[hidden email]> wrote:
>> Is it at least fair to say that for us poor souls without such a
>> utility, such an approach I outlined is good :-)
>
> If you all see a need for it then go for it. :P
> Eclipse (or insert whatever is your preferred dev environment) really
> needs something like Visual Assist; for C++ programming the difference
> is night and day...

I use Visual Studio's compiler, but not the text editor.
For me, it's too slow. It's response is sluggish (to say
the least). Me, I prefer a bare-bones text editor like
SciTE. You know... preferences... ;-)

Eclipse? I find it rather sluggish too. Perhaps due to Java?
Yet it seems to be in the same league as VS in terms of
slugishness. Hey, I'm not bashing here. It's just my observation.
I do find the MS compiler to be one of the best, if not the best.
Herb did good!

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

CARL BARRON-3

On Dec 2, 2008, at 8:23 PM, Joel de Guzman wrote:

>
> I use Visual Studio's compiler, but not the text editor.
> For me, it's too slow. It's response is sluggish (to say
> the least). Me, I prefer a bare-bones text editor like
> SciTE. You know... preferences... ;-)
>
> Eclipse? I find it rather sluggish too. Perhaps due to Java?
> Yet it seems to be in the same league as VS in terms of
> slugishness. Hey, I'm not bashing here. It's just my observation.
> I do find the MS compiler to be one of the best, if not the best.
> Herb did good!

<NOT_BASHING>
        I don't use any of the above and my 'free' tools don't
auto choose a namespace.  [At least I don't think they do:)]
        I don't use windows* for that matter.  I could but I don't.
<\NOt_BASHING>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

OvermindDL1
Yea, VS by default is slow, but that is mostly due to how it handles
completion and such.  Visual Assist kills that and uses its own,
absolute worlds better, a bit of cacheing time upon install and global
header changes, all perfect.  :)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit2] namespaces

Andy Elvey
In reply to this post by CARL BARRON-3
Carl Barron wrote:
> On Dec 1, 2008, at 9:10 PM, Joel de Guzman wrote:
>  
  ( snip )

>> I am really contemplating on hoisting
>> all public components used by a particular module, except the
>> character-set related components, in the namaspaces qi, karma,
>> or lex. For example:
>>
>> namespace boost { namespace spirit { namespace qi
>> {
>>     using boost::spirit::int_;
>> }}}
>>
>> That way, when using Qi, for example, you can use the  
>> boost::spirit::qi
>> namespace exclusively and still get the right components. No need to
>> memorize which components live in which namespace.
>>
>> I'm inclined to do this unless there are objections. Your thoughts?
>>    
>
> great idea
>  
>  
  I also agree.  This looks like a really clean way of doing things.
 - Andy


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel