pharo
pharo copied to clipboard
PlatformIndependentEnvironment does not convey its role
PlatformIndependentEnvironment is a confusing name. Is it a language environment or a shell like? Then PlatformIndependent does not convey the fact that it looks like it is a Null one. I do not really understand because if this is an OS environment what is the at:ifAbsent: method doing. Is it used to get variable such $HOME value?
S
Comment looks like:
- NativeBoost is a thing of the past - we should also change the comment.
- NativeBoost is also mentioned in OSEnvironmentTest>>#testEnvironmentFor where PlatformIndependentEnvironment is referenced
- the class is referenced in -- OSEnvironment class>>#environmentFor: -- OSEnvironmentTest>>#testEnvironmentFor
Do not know who created it but I guess the intention is to use it as a fallback when there is no foreign function interface available (to query for environment variables from the underlying OS platform).
So maybe "FallbackOSEnvironment" is a better name?
Or "NullEnvironment" / "NullOSEnvironment" which would align with other "Null ..." fallback classes in the image:
Ah this is really an OS related. So FallbackOSEnvironment is nice (or NullOSEnvironment).