namespaces and syntactic sugar

General discussion regarding the development of POCO for contributors.
marlowa
Posts: 36
Joined: 19 Jul 2006, 09:02
Location: United_Kingdom

namespaces and syntactic sugar

Postby marlowa » 24 Jul 2006, 20:49

I like what I have seen of POCO so far so I am reluctant to kick things off with a negative post, but... why does POCO use syntactic sugar for namespace scoping? E.g instead of:

namespace Fred {
blah blah
}

we have:

Fred_BEGIN
blah blah
Fred_END

I don't see what practical benefit comes from this style. Can someone enlighten me please?

-Andrew Marlow


guenter
Posts: 1183
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: namespaces and syntactic sugar

Postby guenter » 26 Jul 2006, 09:08

The original idea behind it was to make it easier one day to change namespaces (e.g., put a top-level POCO namespace around everything), without having to change too much source code.

Another side effect is that it saves (at least) one level of indentation.


Return to “Contributors”

Who is online

Users browsing this forum: No registered users and 0 guests

cron