Get the latest tech news
Teaching old assert() new Tricks
Many languages have assert(). This post describes how assert() is implemented in Next Generation Shell and how these aspects/features are consistent with the rest of the language. Implied in the ab…
This post describes how assert() is implemented in Next Generation Shell and how these aspects/features are consistent with the rest of the language. The solution in NGS was to implement assert() that would work with callable EXPR and a subtype of the Exception type. Following once again filling-the-matrix principle, assert(EXPR) flavor can also take some domain specific types.
Or read this on Hacker News