www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

D.gnu - Support for cout and cin

↑ ↓ ← 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
↑ ↓ → 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