Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread Colin Grogan
On Friday, 28 March 2014 at 15:39:48 UTC, monarch_dodra wrote: On Friday, 28 March 2014 at 14:42:54 UTC, Colin Grogan wrote: Im trying to parse command line args and then build a struct that will, at run-time, hold the data the user passed in via command line args. Very similar to Pythons docop

Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread monarch_dodra
On Friday, 28 March 2014 at 14:42:54 UTC, Colin Grogan wrote: Im trying to parse command line args and then build a struct that will, at run-time, hold the data the user passed in via command line args. Very similar to Pythons docopt utility -> https://github.com/docopt/docopt Up till now, I'

Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread Colin Grogan
On Friday, 28 March 2014 at 13:49:59 UTC, Dicebot wrote: On Friday, 28 March 2014 at 11:59:47 UTC, Colin Grogan wrote: I'm interested to hear peoples methods for getting around the lack of foreach loops while using CTFE? Currently, I've been using a lot of recursive templates, but its beginni

Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread Adam D. Ruppe
On Friday, 28 March 2014 at 11:59:47 UTC, Colin Grogan wrote: I'm interested to hear peoples methods for getting around the lack of foreach loops while using CTFE? What, exactly are you trying to do? foreach does work in CTFE, though it will need to be wrapped in helper function that returns

Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread Dicebot
On Friday, 28 March 2014 at 11:59:47 UTC, Colin Grogan wrote: I'm interested to hear peoples methods for getting around the lack of foreach loops while using CTFE? Currently, I've been using a lot of recursive templates, but its beginning to give me a headache and I'd like to see if there's b

Re: Getting around the lack of foreach in CTFE

2014-03-28 Thread bearophile
Colin Grogan: Currently, I've been using a lot of recursive templates, but its beginning to give me a headache and I'd like to see if there's better ways around it. That's a good strategy. In some cases you can use Iota: https://d.puremagic.com/issues/show_bug.cgi?id=4085 On a related note

Getting around the lack of foreach in CTFE

2014-03-28 Thread Colin Grogan
I'm interested to hear peoples methods for getting around the lack of foreach loops while using CTFE? Currently, I've been using a lot of recursive templates, but its beginning to give me a headache and I'd like to see if there's better ways around it. On a related note, is there plans to ad