Re: An illuminating experiment using platform().

new topic     » goto parent     » topic index » view thread      » older message » newer message
CChris said...

This (probably) works. It requires creating as many executables as targeted platforms.

Yes, which is what most people do when distributing applications. Usually they have an installer and offer pre-compiled binaries.

CChris said...

What I am talking about is canned IL, which is what shrouding outputs. If the code being shrouded has an ifdef WIN32, its else part won't be parsed. Fine if I want that IL to execute under Windows. Less fine if I want the IL to execute under Unix.

deferred_ifdef would parse all the alternatives, and make notes about where each starts and ends. When InputIL() is invoked on the target platform, it will cut the unnecessary IL off, so that the backend will execute _as if_ the ifdefs had been resolved on the same machine.

That would take away almost any benefit of ifdef? Then, how would you decide if you want to use ifdef or deferred_ifdef ? And this is only for shrouded code? i.e. interpreted, bound or translated code will all work fine with ifdef.

CChris said...

One file to distribute, no parse time. The added decoompression overhead is negligible, unless there are a ton of ifdefs.

A shrouded file only runs if the user has downloaded Euphoria for their platform and installed it. Do most applications expect the user to do this? Sure, it's fine for developers, but users?

I would suggest that having defered_ifdef would be pretty confusing and counter productive.

Jeremy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu