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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Tricks

Tricks

Photo of new tricks

new tricks

Photo of old assert

old assert

Related news:

News photo

How does WhatsApp make money? It's free - with some tricks

News photo

ESP32: leaving love notes and entering demoscene territory (2022)

News photo

SQL Tips and Tricks