<div dir="auto">Please have a look at Pharo's OSPlatform class Marcel. If some if its interface and purpose fit, we should make it easier to port code.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">K K Subbu <<a href="mailto:kksubbu.ml@gmail.com">kksubbu.ml@gmail.com</a>> schrieb am Di., 26. Mai 2020, 19:31:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 26/05/20 9:13 pm, Marcel Taeumel wrote:<br>
> 1) Is "SystemPlatform" a fitting name? Alternatives: ExternalPlatform, <br>
> HostPlatform, ...<br>
<br>
HostPlatform gets my vote. System is a much abused word :-).<br>
<br>
> 2) Is it useful to document the known platform shorthands via <br>
> #isWindows, #isARM, etc.?<br>
<br>
I prefer HostPlatform to be an abstract class with UnixHostPlatform or <br>
MacHostPlatform subclasses like in OSProcess. Having such concrete <br>
classes also makes it easy to create OS-specific code without having to <br>
use statements like 'name asLowercase ....' all over the image.<br>
<br>
> 3) Is it necessary to access the last platform and the current platform <br>
> in that #systemPlatformChangedFrom:to: callback? Would <br>
> #systemPlatformChanged be sufficient?<br>
<br>
The host platform changes only during cold start. why not name it <br>
coldStartOn: and pass the concrete class as an argument? Checking for <br>
platform change across every snapshot would be an overkill.<br>
<br>
> <br>
> 4) What are your thoughts on #isCompatibleWith: and #isMoreSpecificThan:?<br>
<br>
Not sure if they are really needed at this time.<br>
<br>
> 5) Is it too specific to FFI to be in the "System" package? Can you <br>
> think of VM plugins that would benefit from such a detection? Not sure <br>
> about FileDirectory ... because those instances become invalid after <br>
> startup anyway.<br>
No. Being able to reflect on host platform's properties will help <br>
platform-specific code degrade gracefully on unsupported hosts. While <br>
multiplatform capability is a good feature during development, I suppose <br>
most apps would run on the same host for years together.<br>
<br>
Regards .. Subbu<br>
<br>
<br>
</blockquote></div>