Predefined Versions for Apple Operating Systems
Walter Bright
newshound2 at digitalmars.com
Sat Jun 21 20:24:34 UTC 2025
Currently, the following predefined versions exist for Apple operating systems:
OSX iOS TVOS WatchOS VisionOS
When I look at druntime source code, I see things like:
```d
version (OSX)
version = Darwin;
else version (iOS)
version = Darwin;
else version (TVOS)
version = Darwin;
else version (WatchOS)
version = Darwin;
```
and:
```d
```d
version (OSX) {}
else version (iOS) {}
else version (TVOS) {}
else version (WatchOS) {}
else:
```
appearing ad nauseam.
(note the conspicuous absence of VisionOS appearing in druntime)
I propose, like Windows encompassing Win32 and Win64, that __APPLE__ encompass
OSX, iOS, TVOS, WatchOS, and VisionOS. __APPLE__ is already standardized in C
headers for that purpose.
The use of "darwin" or "Darwin" appears to be quite obsolete.
This will clean up a lot of version algebra in the druntime files.
More information about the Digitalmars-d
mailing list