Hello Roger,

thanks for your answer. Unfortunately, it slightly misses the point.

I wrote:

Background is, that not all languages support namespaces [...]

You answered

I recommend to use the namespace feature, it's supported by nearly every
language

I fully agree with your recommendation, but the problem we're faced with is the "nearly". As I already pointed out and as "nearly" implies, not all languages do this. Therefore, my question was, what the recommendations are in such cases?

Example: Object Pascal.

The only namespace-alike concept we have there, are Units. However, if we are going to do this, then we either have to put everything into one source file per namespace (!) or do some obscure things with includes (which are although possible not very common in pascal, thus the "obscure") just to satisfy the namespace requirement, but introducing many other issues, such as debugging problems, etc. So IMHO this is not the path we should follow. And that's why I asked for alternatives.


Thanks + regards,
JensG


--------------------------------------------------
From: "Roger Meier" <[email protected]>
Sent: Wednesday, August 03, 2011 8:58 PM
To: <[email protected]>
Subject: AW: Thrift class names

I recommend to use the namespace feature, it's supported by nearly every
language
e.g.
namespace java org.example.mypackage
namespace cpp example.mypackage

-Roger
-----Ursprüngliche Nachricht-----
Von: Jens Geyer [mailto:[email protected]]
Gesendet: Mittwoch, 3. August 2011 03:49
An: [email protected]
Betreff: Thrift class names

I'd like to know, if there are any "official" suggestions for the namings
of
Thrift classes in general?

Background is, that not all languages support namespaces and the original
names (I refer to the C++ implementation) might create naming conflicts
with other environments. Currently I avoid that by renaming the classes in
my case, I add an additional "Thrift" to the name, so that (example)
TBinaryProtocol becomes TThriftBinaryProtocol.

Is this in line with the guidelines (if any), or are there any other
requirements
or suggestions?

Thanks + regards,
JensG








Reply via email to