May 27, 2013 wc.d program from the website | ||||
---|---|---|---|---|
| ||||
Attachments:
| Does the code at http://dlang.org/wc.html represent the canonical D code style? I note that: rdmd wc.d < wc.d fails to behave analogously to how: /usr/bin/wc < wc.d does. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder |
May 27, 2013 Re: wc.d program from the website | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | On Monday, 27 May 2013 at 10:26:37 UTC, Russel Winder wrote:
> Does the code at http://dlang.org/wc.html represent the canonical D code
> style?
>
> I note that:
>
> rdmd wc.d < wc.d
>
> fails to behave analogously to how:
>
> /usr/bin/wc < wc.d
>
> does.
I'm pretty sure canonical wc in D would use ranges now (spliter, byLine, walkLength). And yes, you are right about how it isn't very Unix-like with regards to how it handles the input.
|
Copyright © 1999-2021 by the D Language Foundation