News for hackers. Stuff that matters.
Re:Microfeatures I'd like to see in more languages by cpurdy on Saturday January 07, 2023 @07:43PM (#34294751)
This is one that I like a lot. Years ago (1997 timeframe) I had implemented it in a Java compiler, and a few years later in a Java library (https://github.com/oracle/coherence/blob/4e6e343e1ffd9bbfea3...) that would create an exception on the assertion failure and parse its stack trace to find the source code file name, and read it to find the text of the assertion that failed, etc. so it could build the error message ...

In Ecstasy, we built the support directly into the compiler again:

    val a = 1;
    val b = 2;
    assert a == b;
Produces:

    IllegalState: a == b, a=1, b=2

There are no comments on this comment yet.