You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Env.root currently has type (AmbientAuth | None) to allow for creation of artificial Env instances without AmbientAuth. Yet, there is no observable usage of this feature. As it is requires extra work to make use of, as one always needs a pattern match or an as expression with a surrounding try, this RFC wants to change its type to AmbientAuth and make AmbientAuth required when constructing an artificial Env instance, until a better solution is found.
Yay! I have been hoping for this change since May 2016. #301 (comment)
Env and AmbientAuth are about static properties of the code; allowing the possibility that Env ever doesn't have AmbientAuth only results in useless checks to satisfy the type checker. AmbientAuth means "whatever ambient authority main() was called with". Attempts to use that authority may fail at runtime, of course. But to put into the type the possibility that there may be no such datum introduces only cost and no gain.
Env.root
currently has type(AmbientAuth | None)
to allow for creation of artificialEnv
instances withoutAmbientAuth
. Yet, there is no observable usage of this feature. As it is requires extra work to make use of, as one always needs a pattern match or anas
expression with a surroundingtry
, this RFC wants to change its type toAmbientAuth
and makeAmbientAuth
required when constructing an artificialEnv
instance, until a better solution is found.https://github.com/ponylang/rfcs/blob/master/text/0065-env-root-not-optional.md
The text was updated successfully, but these errors were encountered: