Tango Influences
Kris
foo at bar.com
Mon Nov 19 04:07:43 PST 2007
"Don Clugston" <dac at nospam.com.au> wrote ...
> Kris wrote:
>> "Don Clugston" <dac at nospam.com.au> wrote in message
>>
>>> Kris -
>>> I think there's a legitimate concern here which you've been ignoring. It
>>> would be helpful to give some background as to why Tango uses the
>>> conventions it does. And my guess is that the primary reason Tango uses
>>> the conventions it does, is that you have a Java background!
>>
>> Sure I'm familiar with Java, Don. But I'm also familiar with Simula,
>> Pascal, Modula, Ada, C#, etc. To claim that Tango is driven by a Java
>> background is being more than a tad superficial :)
>
> Perhaps it's not Java at all, but rather "curly brace languages other than
> C/C++". For a C++ programmer, the Tango style looks very foreign, and (to
> me, a non-Java programmer) feels like Java. And the Phobos style feels
> much more familiar.
> But I also think (as a non-C# programmer) that C# also looks similar to
> Java (and similarly foreign).
FWIW, I have written mountains of C, so it's not at all unfamiliar to me. At
the time I'd encourage people to write structs of pointers to encapsulate
library functionality, and place those structs within other in order to gain
some better degree of maintainability in very large systems (for 15 years.
Actually more than that, but who's counting). It worked for us.
Anyway, here's the thing: we decided that the style of Tango would have a
somewhat OO flavour, rather than like a C library. This seems to be a common
approach with 'modern' libraries so, as I recall, we were quite comfortable
making that choice. Perhaps that's the aspect that you're seeing? I don't
think it's a Java style per se, although the containers do originate there.
Is it perhaps an OO style distinction?
> This isn't a criticism in any way (as an expat, I spend most of my life
> feeling foreign!), just an observation. Most of the unfavourable comments
> about the Tango style seem to be coming from C++ programmers, and I think
> it's related to what they (we) are used to.
(I'm an expat also, so may be used to "feeling foreign" also)
You may well have a point there. Yet, this thread is not about the fact that
Tango uses some decorator patterns here or there, or that the I/O system is
different to C++ (phobos does that also, I expect?). Or that it has a Text
class, or FilePath, or whatever. It's not about OO at all. Instead, it is
about module names, of all things. I'd really like to say this is wholly
relevant to being sympathetic to C++ developers, but it's hard to see the
connection. Maybe you can help out there?
Let me ask: how does the matter of module names significantly help a C or
C++ programmer get used to all the differences in D and any D library? I
would have though any significance would be in the language and library
design, rather than whether the module names are lowercase, uppercase or
camelcase? Isn't this a minor stylistic point instead?
>> Now I'm interested: where did you get that notion from, Don? Perhaps
>> because I used it as an example at the conference?
>
> Long before that. You've mentioned Java a fair bit over the years. I
> remember that you didn't come from C++, anyway.
Ah, well the C++ part is true. It's related to why I've been such a D
advocate.
More information about the Digitalmars-d
mailing list