
=========
Changelog
=========

This page contains the (mostly) complete history of Nonstraightforward.

#####################
Nonstraightforward C9
#####################

.. note::
    Until Nonstraightforward C9's core is finished, versions will use the date
    of the commit(s) it is assigned to.

2026.05.17
----------

* Bootstrapped ``codegen.nstrfwd`` using C9, now ``parser.nstrfwd`` is the last
  C8 file in the compiler

Language features
^^^^^^^^^^^^^^^^^

* Added classifications (not classes, class**ifications**)

  .. code-block:: text

      classification WhyWouldYouDoThis {
          constructor(x, y, z) {
              ~/usr/bin/this/x = x;
              ~/usr/bin/this/y = y;
              ~/usr/bin/this/z = z;
          }

          public stable immutable readonly synchronous subroutine sum() {
              reciprocate ~/usr/bin/this/x + ~/usr/bin/this/y + ~/usr/bin/this/z;
          }
      }

* Added ``switch``/``case`` (the closest we will get to the original ``match``
  until the end of time)

  .. code-block:: text

      switch (x) {
      case 0: ~/dev/stdout/write/ln("even"); terminate;
      case 1: ~/dev/stdout/write/ln("odd"); terminate;
      case 2: ~/dev/stdout/write/ln("even"); terminate;
      case 3: ~/dev/stdout/write/ln("odd"); terminate;
      case 4: ~/dev/stdout/write/ln("even"); terminate;
      case 5: ~/dev/stdout/write/ln("odd"); terminate;
      case 6: ~/dev/stdout/write/ln("even"); terminate;
      case 7: ~/dev/stdout/write/ln("odd"); terminate;
      case 8: ~/dev/stdout/write/ln("even"); terminate;
      case 9: ~/dev/stdout/write/ln("odd"); terminate;
      case 10: ~/dev/stdout/write/ln("even"); terminate;
      case 11: ~/dev/stdout/write/ln("odd"); terminate;
      case 12: ~/dev/stdout/write/ln("even"); terminate;
      case 13: ~/dev/stdout/write/ln("odd"); terminate;
      case 14: ~/dev/stdout/write/ln("even"); terminate;
      case 15: ~/dev/stdout/write/ln("odd"); terminate;
      case 16: ~/dev/stdout/write/ln("even"); terminate;
      case 17: ~/dev/stdout/write/ln("odd"); terminate;
      case 18: ~/dev/stdout/write/ln("even"); terminate;
      case 19: ~/dev/stdout/write/ln("odd"); terminate;
      case 20: ~/dev/stdout/write/ln("even"); terminate;
      default: ~/dev/stdout/write/ln("out of range [0, 20]"); terminate;
      }

* ``variable`` now compiles to ``let`` instead of ``var``
* Added the ``typeof x`` and ``x instanceof y`` operators

2026.05.16
----------

* Got the compiler working just good enough to compile a Mandelbrot set painter
* Bootstrapped part of the compiler with itself instead of C8

  * Caused me some pain trying to resolve things.

* Added proper warning and error messages

  * The language doesn't support template string literals yet, it just outputs
    them the exact way they came in, so ``console.log(\`${~/dev/stdout}\`);``
    results in the source being ``console.log(\`${~/dev/stdout}\`);`` instead of
    the intended ``console.log(\`${SYSROOT.dev.stdout}\`);``

Language features
^^^^^^^^^^^^^^^^^

* Added boolean literals ``true``/``affirmative`` and ``false``/``negative``
* Added object literals
* Added the following operators

  * ``new x`` and ``new x(y)``
  * ``await x``
  * ``!x``, ``+x``, and ``~x``
  * ``x[y]`` and ``x.y``
  * ``a ^ b`` and ``a ^= b``
  * ``a | b`` and ``a |= b``
  * ``a & b`` and ``a &= b``
  * ``a || b`` and ``a ||= b``
  * ``a && b`` and ``a &&= b``
  * ``a ** b`` and ``a **= b``
  * ``a ..= b``
  * ``a != b`` and ``a !== b``

* Added ``new.target``
* Added ``if(...) ...`` and ``if(...) ... else ...`` statements

  * Added their Nonstraightforward counterparts ``stipulate that the provision
    ... qualifies`` and ``otherwise``

* Added ``while(...) ...`` and ``do ... while(...)`` statements

  * Added the Nonstraightforward while loop ``so long as the condition ... is
    still upholding, then do ...``
  * Added ``break``/``terminate`` and ``continue`` statements

* Added Nonstraightforward ``from module "module.js" request { imports };``

  * Added support for specifying the raw ``.nstrfwd`` extension for a module 
    path (it automatically gets replaced by ``.nstrfwd.js`` in codegen)

* Added ``throw expr;`` and its Nonstraightforward form ``retaliate expr;``
* Added ``reciprocate expr;`` as a Nonstraightforward form of ``return expr;``
* Added ``async``/``asynchronous`` and ``await``
* Added ``~/dev/stderr/write/ln`` for ``console.error``
* Added ``~/dev/random`` and ``~/dev/urandom`` as aliases for ``Math.random()``
* Added ``~/dev/zero`` which just returns zero

Vanity changes
^^^^^^^^^^^^^^

* Added this site

2026.05.15
----------

Language features
^^^^^^^^^^^^^^^^^

* Added ``function``/``subroutine``
* Added the following operators

  * ``a = b``
  * ``a += b``
  * ``a -= b``
  * ``a *= b``
  * ``a /= b``
  * ``a % b`` and ``a %= b``
  * ``a << b`` and ``a <<= b``
  * ``a >> b`` and ``a >>= b``
  * ``a >>> b`` and ``a >>>= b``
  * ``a == b`` and ``a === b``
  * ``a >= b`` and ``a <= b``
  * ``a .. b`` (Lua string concatenation operator)

2026.04.07
----------

* Changed architecture from a horrible preprocessor to an actual compiler like
  TypeScript
* The outputted code hopefully looks a lot better than what C8 outputs

Language features
^^^^^^^^^^^^^^^^^

* Added numeric, string, identifier, and array literals
* Added grouping expressions
* Added the following operators

  * ``-x``
  * ``a + b``
  * ``a - b``
  * ``a * b``
  * ``a / b``
  * ``x(y)`` (call)

* Added block, expression, function (ES), return, and variable (ES) statements
* Added ``SYSROOT`` (the ``~/`` thing)
* Replaced ``~/dev/scope`` with ``~/usr/bin`` to better match real-world POSIX

#####################
Nonstraightforward C8
#####################

* Stable release, rename from ConvolutedScript and ``.cvsc`` to
  Nonstraightforward and ``.nstrfwd``

Language features
-----------------

* Added interface syntax (that would later be disposed of)

  .. code-block:: text

      public noondefault stable object structure member layout Vector2 {
          stable member x <= number;
          stable member y <= number;
      }

  * That typo was always there and I'm preserving it (but it wouldn't work if
    you kept the typo!)

* Added three new stability specifiers

  * ``volatile``
  * ``hazardous``
  * ``biohazard``

* Renamed the ``______A_SFWrowwl0WKFuAOwa90ifnh____________________________________________ROOT``
  variable to ``SYSROOT`` since that's the actual name of the ``~`` thing

################
ConvolutedScript
################

Past this point is the distant past of Nonstraightforward when it used to be
named ConvolutedScript and have the ``.cvsc`` file extension.

###################
ConvolutedScript C7
###################

Language features
-----------------

* Added ``affirmative`` and ``negative`` as better substitutes for ``true`` and
  ``false``
* Added support for ``+=``, ``-=``, ``*=``, ``/=``, ``===``, ``!==``, ``>=``,
  and ``<=``
* Added support for the nonstraightforward ``stipulate that the provision
  [condition] qualifies`` conditional statement
* Added support for the nonstraightforward ``so long as the condition [cond]
  is still upholding, then do`` while loop

###################
ConvolutedScript C6
###################

* The start of the changelog
* renamed from Discombobulation to ConvolutedScript

Language features
-----------------

* Added multiline strings
