SE-0513: API to get the path to the current executable

What sorts of invalid are we talking about here?

(Emphasis added.)

If valid UTF-8 cannot be guaranteed but the implementation must bypass validation for whatever reason (e.g., performance), then it seems this needs to be an unsafe API or it needs to use some foreign storage representation so that validation is lazily triggered where it matters.

[Edit: the implementation does seem to use validating APIs on String—which, unless I'm misunderstanding, means that this API does return nil if there's invalid UTF-8.]

2 Likes