Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a preprocessor symbol to indicate FABLE compilation #331

Closed
tomcl opened this issue Aug 8, 2016 · 4 comments
Closed

add a preprocessor symbol to indicate FABLE compilation #331

tomcl opened this issue Aug 8, 2016 · 4 comments
Labels

Comments

@tomcl
Copy link
Contributor

tomcl commented Aug 8, 2016

Would help writing code that is automatically portable between FABLE and FSC. Can do this anyway with com line symbols but this would make such functionality work out of the box.
Proposed symbol:

__FABLE_COMPILER__

(adjust underscores to be compatible with global conventions I probably don't know)

@forki
Copy link
Collaborator

forki commented Aug 8, 2016

Maybe it could add antoher symbol which gives version information. But not sure if that's practical.

@alfonsogarciacaro
Copy link
Member

Given that Fable is evolving very quickly now, probably including version information won't be very practical indeed. In F# I think usually the double underscore is used for macros like __SOURCE_DIRECTORY__, but compilation symbols tend to be simpler (INTERACTIVE). Probably just FABLE would be too simple. FABLE_COMPILER?

@forki
Copy link
Collaborator

forki commented Aug 8, 2016

Yes I would go with FABLE_COMPILER

@tomcl
Copy link
Contributor Author

tomcl commented Aug 8, 2016

FABLE_COMPILER is good with me.

However, I'd still wonder whether _FABLE_COMPILER_ or _FABLE_COMPILER would be better with the underscores indicating system-level status. I defer to whatever others more familiar with F#/Javascript conventions think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants