Re: echo: "-n", the next installment

2013-07-27 Thread John Colvin
On Saturday, 27 July 2013 at 12:59:06 UTC, monarch_dodra wrote: On Saturday, 27 July 2013 at 12:19:44 UTC, John Colvin wrote: On Saturday, 27 July 2013 at 01:09:03 UTC, Jesse Phillips wrote: On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to i

Re: echo: "-n", the next installment

2013-07-27 Thread John Colvin
On Saturday, 27 July 2013 at 12:52:11 UTC, monarch_dodra wrote: And here is the second comment I wanted to put: When parsing the options, you use an if-else. I don't know if its just me, but I find that using a switch is clearer (it's what you do in your second example). It also introduces str

Re: echo: "-n", the next installment

2013-07-27 Thread monarch_dodra
On Saturday, 27 July 2013 at 12:19:44 UTC, John Colvin wrote: On Saturday, 27 July 2013 at 01:09:03 UTC, Jesse Phillips wrote: On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co

Re: echo: "-n", the next installment

2013-07-27 Thread monarch_dodra
On Saturday, 27 July 2013 at 12:39:24 UTC, monarch_dodra wrote: On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co.uk/2013/07/the-first-corner-n-for-echo.html I tried to post a

Re: echo: "-n", the next installment

2013-07-27 Thread Joseph Rushton Wakeling
On Saturday, 27 July 2013 at 12:19:44 UTC, John Colvin wrote: I'm pretty sure it wouldn't work ideally for echo as the behaviour depends on the order of the arguments. It also has some odd little niggles -- e.g. it's not nice that with a short option you can have --t 5 and --t=5 but not -t 5

Re: echo: "-n", the next installment

2013-07-27 Thread monarch_dodra
On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co.uk/2013/07/the-first-corner-n-for-echo.html I tried to post a comment on your blog, but I failed. Anyways, I wanted to post:

Re: echo: "-n", the next installment

2013-07-27 Thread John Colvin
On Saturday, 27 July 2013 at 01:09:03 UTC, Jesse Phillips wrote: On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co.uk/2013/07/the-first-corner-n-for-echo.html BTW, std.getopt

Re: echo: "-n", the next installment

2013-07-26 Thread Jesse Phillips
On Friday, 26 July 2013 at 00:38:46 UTC, John Colvin wrote: After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co.uk/2013/07/the-first-corner-n-for-echo.html BTW, std.getopt is a good way to parse arguments. Not sure if it is relevant to w

echo: "-n", the next installment

2013-07-25 Thread John Colvin
After a few weeks of not getting around to it, here's my second post: http://foreach-hour-life.blogspot.co.uk/2013/07/the-first-corner-n-for-echo.html