-
Notifications
You must be signed in to change notification settings - Fork 617
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
Consider renaming "unix" and "darwin" #100
Comments
I used Of course, the original intent was to tie the OS to the GUI toolkit used. If there's a good reason to allow any OS to use any GUI toolkit then I could rename these as suggested. The only reason I can think of is to add a |
Interesting. It might be because Go only uses the C BSD UNIX part of OSX (Darwin). The rest of OSX, sitting on top of that, is Objective-C, e.g. Cocoa. So you're using OSX, not Darwin.
POSIX is a standard, so I guess they are saying they are using the POSIX standard. There are many small differences between Unices (BSD, Darwin, IRIX, etc).
Win32 is more specific to the GUI library library libui is using. Windows has multiple GUIs (MFC, AFC, WPF). Granted not all in C/C++ and perhaps practical to use here.
It's a noble aim but you might have to buy a fireproof suit 😆, especially when you are aiming at Linux. Their community is deeply divided between GTK+ and Qt. On the one hand it fosters competition, which leads to innovation, but do wonder how far Linux would have come without all the factions. It's one of the reasons I use OSX, you get a nice solid UNIX platform with a single GUI on top. Anyway, I'm waffling.
The aforementioned reasons.
I mentioned in the other thread a possible structure. I've had similar issues with my Gwork library re-platforms and rendering APIs. Platforms:
And your GUIs are:
So the GUI supplies the windowing code and the platform supplies everything else, which can be shared between GUIs. Best to think of the abstraction rather than the OS. I.e. what does a platform provide, and the platforms just implement a driver, like the model you have. True cross platform libraries are a platform in their own right at this abstraction level. I'm not sure about GTK+, it is cross platform, but I've also read it is lacking as a platform. |
So a possible directory structure is:
I think this depends on how well you define the abstractions and the structure of the project. It's just an engineering problem. Abstractions allow you to hide the complexity behind an API of your choice. The more stuff is mashed up without structure, the more complexity there will be. Perhaps an example of this is how much simpler the cmake config looks when you split it up. The complexity becomes localised and easier to deal with. It also allows other people to add platforms and GUIs at a later date using your abstraction. In the above model I'd say it is fairly easy to guess where a new platform (e.g. Haiku goes) and where its GUI(s?) will live and which functionality they need to provide. |
Whatever the case, this will not happen until after the next packaged release (likely to be called Alpha 4). |
To me, "unix" and "darwin" don't really make sense. "gtk" and "cocoa" seem more appropriate since that is what the code is wrapping.
Mentioned previously here by @billyquith
The text was updated successfully, but these errors were encountered: