April 19, 2004 Re: Variable arguments: opStream | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivan Senji | Hmm ... I thought it would be out of discussion because in D things like having the << operator working as streaming AND shifting operator should be avoided. Therefore I thought using <- and -> could be a good idea. Introducing new operators with defined behaviour wouldn't be that bad. Anyway, after being a lurker here for a couple of weeks and being interested in D I just wanted to express my wish for something similar to cin/cout in D - I'll have a look at the classes on dsource. You know, I'd certainly like to get rid of that stupid printf once and for all, really :-) Good night, -Mike |
April 20, 2004 Re: Variable arguments: opStream | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike | Mike wrote:
> Hmm ... I thought it would be out of discussion because in D things like having
> the << operator working as streaming AND shifting operator should be avoided.
> Therefore I thought using <- and -> could be a good idea. Introducing new
> operators with defined behaviour wouldn't be that bad.
>
> Anyway, after being a lurker here for a couple of weeks and being interested in
> D I just wanted to express my wish for something similar to cin/cout in D - I'll
> have a look at the classes on dsource. You know, I'd certainly like to get rid
> of that stupid printf once and for all, really :-)
>
> Good night,
> -Mike
>
>
Hey Mike,
I brought it up because I realize that some programmers seem to have a real bond with the << and >> operators for stream use, especially when they come from C++ (I can't stand this use of shift operators myself). DSC.io allows use of them on both linux and windows. The library also provides an alternative method that I prefer. The other method is basically a form of multiple function calls. You'll have to see it. These methods could likely be improved upon, but it's nice just to know that we have something other than printf and <<, >>. There is not much documentation for the project yet other than in-source comments and sample unittest code which sufficient for the most part. The author, Kris, is getting ready to release the source at www.dsource.org soon.
|
Copyright © 1999-2021 by the D Language Foundation