Raku / nqp

NQP
Other
345 stars 131 forks source link

HLL::Grammar.O dissects a string arg into a hash #145

Open arnsholt opened 11 years ago

arnsholt commented 11 years ago

The $spec argument to HLL.Grammar.O is not something we'd like to keep in its current state.

I've been thinking over refactoring it so that it becomes method O($name, *%hash), but going from the comments above the method it could be that a hash literal (which we still don't have AFAIK) is preferred. @jnthn, @pmichaud: Do you have any opinions on this?

The refactor has to proceed something like this, I think: 1) Implement the new O has a multi candidate (we have to keep using the old way in the NQP code because of the stage0 compiler) 2) Update the bootstrap files 3) Update the NQP code to use the new O API and remove the old one. 4) Update bootstrap again

arnsholt commented 10 years ago

As jnthn points out (on IRC), no need for a bootstrap update. The bootstrap compiler has its own HLL::Grammar and thus its own O, so we can actually just rip out the old one and put in a new one.

arnsholt commented 10 years ago

I've started working on this in the O-refactor branch, but there's some funny business I suspect is due to #46.