|
|
|
|
|
by mikepurvis
2199 days ago
|
|
I dunno, I think they're pretty similar— both are an arbitrary cap that protects against exhausting a real world resource (time, memory). In any case, the compile time evaluation would obviously still have a bunch of interesting constraints— like, probably reasonable to read in the contents of a file, but is it reasonable to make a network call? What about reading a file that's on a network share? Can you even tell the difference? That operation could also hang for reasons entirely outside of algorithmic complexity. And of course, like a stack overflow, that's also true today; you can hang your compile by including a header from a network share that hangs. So would it really be that bad to have the compilation hang, and just show a stack trace for the invoked-at-compile-time code when interrupted? I don't think the halting problem is a deal breaker here. |
|