www.digitalmars.com         C & C++   DMDScript  

D.gnu - Support for cout and cin

reply ranjit_bh hotmail.com writes:
I have just been introduced to D. But if there is support for  c++ why was not
the cout or the cin operator not allowed for in D
Mar 10 2003
parent Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
ranjit_bh hotmail.com wrote:

 I have just been introduced to D. But if there is support for  c++ why was not
 the cout or the cin operator not allowed for in D
Technically, there isn't support for C++. D is able to link with C, not C++. So you can declare a function in D to be extern(C), do the same in C++, and use them to link the two together. cout and cin are instances of template objects in C++. D uses a different template syntax. As I understand it, Walter doesn't like the cout/cin design, and sees no need to duplicate it. D will eventually use something else. If you would like to invent your own I/O stdlib, feel free...and submit it to the newsgroup for discussion. Maybe your work will be the start of something big! Russ -- The Villagers are Online! http://villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
Mar 12 2003