March 11, 2003 Support for cout and cin | ||||
---|---|---|---|---|
| ||||
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 |
March 12, 2003 Re: Support for cout and cin | ||||
---|---|---|---|---|
| ||||
Posted in reply to ranjit_bh | 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))) ] |
Copyright © 1999-2021 by the D Language Foundation