Open
Description
interp very sensibly avoids evaluating init functions with side effects.
panic() has the side effect of halting the program.
This means that regexp.MustCompile() is always executed purely at runtime instead of compiletime... leading to slow startup for edge applications, where init runs for every request.
Thinking it through, though, it would be completely reasonable for panic()
inside an init function to halt compilation. It would give a better
developer experience - invalid regexps in init functions would halt
compilation! - and a better runtime experience, particularly on the edge.