Open Robert-M-Muench opened 9 years ago
Hi Robert,
I understand your idea and find it quite interesting (having the compiler check things with a final switch is a very good idea) But I'm halas totally not able to answer your questions. I'm afraid I haven't used D for quite a long time now (I don't even have a D compiler on my current machine). I would have to take quite a long time to find again how the Pegged code is structured and see how to integrate your code. I cannot help right now, sorry.
Of course, if you find the time to integrate your idea into Pegged, I'd be delighted to push it into the github repo and update the version for Dub to pick it.
I'm sorry for not being able to contribute to your idea. It seems my coding years are passed :-(
Hi Philippe, you created such a nice tool with PEG and don't use D anymore? Hmm... what happend? Your coding years shouldn't have passed... we need everyone that creates cool D stuff.
I haven't looked into the PEG code (yet) but would expect that it's not very easy. Do you have any notes, design information etc. that could help to get into it?
Hi Philippe, you created such a nice tool with PEG and don't use D anymore? Hmm... what happend? Your coding years shouldn't have passed...
Oh, just Real Life (tm). Job changes, interesting work opportunities, more responsibility, more children, etc. Coding is (was) a hobby for me, not my day job.
I haven't looked into the PEG code (yet) but would expect that it's not very easy. Do you have any notes, design information etc. that could help to get into it?
Halas no. Just many wiki pages on the github site and the git history, but the latter is not very informative.
Hi, I have written a quite complex set of templates, mixins, and conversions to derive an enum from the rules, that can be used in a final switch statement so that the compiler will catch cases that are not handled.
Like this:
I think being able to use final switch with a PEG to handle cases would be a very useful generic pattern.