pharo icon indicating copy to clipboard operation
pharo copied to clipboard

PlatformIndependentEnvironment does not convey its role

Open Ducasse opened this issue 2 years ago • 3 comments

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

Ducasse avatar Jun 15 '22 16:06 Ducasse

Comment looks like:

image

astares avatar Jun 15 '22 16:06 astares

  • 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:

image

astares avatar Jun 15 '22 16:06 astares

Ah this is really an OS related. So FallbackOSEnvironment is nice (or NullOSEnvironment).

Ducasse avatar Jun 15 '22 18:06 Ducasse