Add a default namespace declaration for all languages
-----------------------------------------------------

                 Key: THRIFT-9
                 URL: https://issues.apache.org/jira/browse/THRIFT-9
             Project: Thrift
          Issue Type: Improvement
            Reporter: Johan Stuyts
            Priority: Minor


The namespace for each language has to be specified separately. As new 
languages are supported, existing Thrift files automatically become outdated 
because no namespace has been specified for the new languages. I also suspect 
that in most cases most namespaces have the same value:
{code:none}namespace cocoa  com.acme.foo
namespace cpp    com.acme.foo
namespace csharp com.acme.foo
namespace java   com.acme.foo
php_namespace    com.acme.foo
namespace perl   com.acme.foo
namespace py     com.acme.foo
namespace rb     com.acme.foo
namespace smalltalk.category Acme.Foo{code}

By introducing a default namespace the number of namespace declarations can be 
reduced, and the chance that a Thrift file has to be updated because a new 
language is supported becomes smaller. Namespace declarations for a specific 
language override the default namespace:
{code:none}namespace * com.acme.foo
namespace smalltalk.category Acme.Foo
{code}

Instead of using an asterisk the keyword {{default}} could also be used.

This issue was discussed earlier on the mailing list:
http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to