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

Refactor platform detection internals #16

Open
mfelsche opened this issue Dec 5, 2019 · 1 comment
Open

Refactor platform detection internals #16

mfelsche opened this issue Dec 5, 2019 · 1 comment

Comments

@mfelsche
Copy link
Contributor

mfelsche commented Dec 5, 2019

With merging of #15 we now have a mixture of ifdef and if (in case of osx) for detecting how to generate application directories.

It might be cleaner to use a primitive like:

primitive Osx
primitive OsxAsUnix
primitive Unix
primitive Windows

type Platform is (Osx | OsxAsUnix | Unix | Windows)

and use a match statement in each function to determine how to create the particular appdirs.

cc @SeanTAllen does that express your ideas?

@SeanTAllen
Copy link
Member

@mfelsche yes.

a key point being that we determine the platform once on startup and then use that platform type with matching everywhere else.

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

No branches or pull requests

2 participants