Re: Trying to build a Scheme interpreter in D

2016-03-10 Thread John via Digitalmars-d-learn
On Wednesday, 9 March 2016 at 20:30:44 UTC, Guillaume Piolat wrote: On Tuesday, 8 March 2016 at 18:11:24 UTC, John wrote: You can go with Algebraic. I used to do that in scheme-d. Then I switched to a tagged union by hand to avoid a compiler regression. Algebraic was OK. 2x speed differe

Re: Trying to build a Scheme interpreter in D

2016-03-09 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 8 March 2016 at 18:11:24 UTC, John wrote: * For this kind of implementation, is the Algebraic type a good choice ? Is a simple union perhaps better ? You can go with Algebraic. I used to do that in scheme-d. Then I switched to a tagged union by hand to avoid a compiler regressio

Trying to build a Scheme interpreter in D

2016-03-08 Thread John via Digitalmars-d-learn
Hi, I'm currently reading "Programming in D" and in order to get accustomed to D and it's syntax, I've decided to implement (actually port) a simple (and naive) Scheme interpreter from C to D. The original interpreter (in C) is described in a series of posts here: http://peter.michaux.ca/ar