Tango compatability with Phobos

Yigal Chripun yigal100 at gmail.com
Mon Oct 15 00:33:33 PDT 2007


Daniel Keep wrote:
> Yigal Chripun wrote:
>> ...
>> Until we reach a merged, agreed by all one API, there is no standard
>> library for D in my mind.
> 
> "agreed by all one API"  Yeah, I don't think that's gonna happen.  Ever.
>  You're asking programmers to unilaterally agree on a large, complex topic.
> 
> These are the people who continually rewrite stuff because of "not
> invented here" or "don't like the capitalisation on the identifiers" or
> "because I felt like it" syndromes... :P
> 
>> ...
>>
>> P.S
>> i'd prefer either be able to import Cout and just have two functions
>> like print/println with formatting, or changing Cout to out (no upper
>> case letters, and without C-style shortcut names)
>> I prefer more readable java style with camel case full names rather than
>> c/c++ 3 letter abbreviations like ptr instead of pointer, buf instead of
>> buffer and etc.. (we all know that we read code a lot more than we write
>> it, so it's better to write longerIdentifierNames which would be easier
>> to read and understand later)
> 
> See, and I prefer the terseness of C.  One thing that always made me
> want to throw the computer out the window when programming Java was the
> fact that every damn statement took, at minimum, three lines to do
> anything constructive just because all the identifiers were so bloody long.
> 
> I want to write code.  Not a dissertation.  When you've got names that
> long, you just end up with this dense, unreadable mess.  Besides, if the
> names are a little bit cryptic, people will actually take the time to
> carefully read the code to make sure they understand it instead of
> assuming they know what it means, which is *clearly* better.
> 
> Give me function names I can type in under three seconds and some decent
> comments any day.
> 
> And that's the problem.  I think that for some people Phobos is better
> because it's a lot like the standard C library.  They like it like that.
>  That's why I think all the calls for a complete merge are a bit silly;
> D's unique AFAIK in that it's got a very lean, simple API and a much
> more powerful, more complete API.
> 
> Make them compatible, sure, but keep them separate.  Don't take away our
> toys just because *you* don't play with them.  :)
> 
> 	-- Daniel

well, maybe "agreed by all one API" was to strong a statement, but what 
i really meant was something  like the STL for C++. you do have 
alternative libraries you could use but STL comes with all modern C++ 
compilers and is considered by the community as the standard library.

i do agree that java is too verbose a language, but that's because of 
its structure and design (lack of operator overloading, protection 
attributes on each function without being able to group them, etc... )
if you take a richer language like D with the Java _style_ you could get 
relatively short code which is more readable, IMO.

you don't really have to have two distinct APIs with different code 
bases in order to have two different styles of coding. i think creating 
a merged super-set of both APIs on top of tango would in fact create one 
more complete API which you could use a subset of, which gives you that 
C feel you seek.
the benefits to that approach is having different complimentary "views" 
of the same codebase thus having one IO subsystem for example.





More information about the Digitalmars-d mailing list