2 ms·
That's a difference based on the way Go implements defer, but not a principle of defer. A lexically scoped based defer is conceivable. That said, it's worth no
by Jtsummers 5y ago
That's a difference based on the way Go implements defer, but not a principle of defer. A lexically scoped based defer is conceivable.
That said, it's worth noting that difference in practice since Go is, as far as I know, the only mainstream language with defer as a major and commonly used construct.
- rightbyte 5y agoI guess Go's "defer" is from "rescue" in Alef (the Plan 9 language). Kinda the same guys. But "rescue" was only executed on signals.