|
Re: A Deeper Look at Metafunctions
|
Posted: Oct 9, 2004 5:37 AM
|
|
> You should be flattered David, I hold your work in very > high regard.
Thank you.
> Making an entire language available at compile time is > difficult for a compiled multi-paradigm language like > Heron or C++. What do you do about functions that depend > on command line arguments or user input?
The usual. If there's no way to get at argc and argv outside of main, metafunctions can't touch them. If the metafunction depends on user input, it waits for user input, as usual. I don't see a problem there.
> What about user > defined casts and operator overloads?
What about them?
> What about floats, > which because that are system dependant will compile > differently on different compilers?
ditto.
> Either you don't make > them available at run-time or you have some kind of > default behaviour in these conditions
No, you just have non-portable results.
This is no great mystery and it presents no serious problems; it's been done before in other languages.
> , which is > essentially the same as separating semantics. Even the > article on meta-code you link to, the semantics are not > the same as C++, just similar.
I know that. It's one of the limitations of metacode that I dislike.
> I like to keep things > explicit, if there are two sets of rules, one for compile > time and one for run-time, you might as well make it very > clear.
Yes, but you don't need two sets of rules. Simple is better than explicit and complex.
|
|