
Show HN: Practical programming language with expressive power, in 10K LOC C++11 - rusini
https://github.com/rusini/manool/wiki
======
karmakaze
> the syntax of MANOOL is actually so simple that it could be “described on a
> postcard”.

This immediately makes me want to read said postcard. Is there something to
this effect? [Couldn't find it.]

I didn't see the advantage in using braces instead of Lisp-parens or
functional languages that use neither. The first thought that came to mind was
using the semi-colon insertion parsing like Go, but on source text that uses
whitespace indentation like Python and insert all the braces needed by the
parser.

~~~
rusini
Well, what about this program?:

    
    
        -- factorial
        { {extern "manool.org.18/std/0.2/all"} in
        : let
          { Fact =
            { proc { N } as
            : unless N.IsI48[] & (N >= 1 - 1) signal
            {if (~)[N.IsI48[]] then TypeMismatch else InvariantViolation}
            else
            : var { Res = 1 } in
            : do Res after
            : while N <> 0 do Res = N * Res; N = N + ~1
            }
          }
          in
          Out.WriteLine[/* Out; */ "Factorial of 10 is "; Fact[10]$]
        }
    

It has absolutely _all_ syntactic features and even makes sense!

~~~
karmakaze
I find the nesting of elements hard to follow and would prefer something like:

    
    
        -- factorial
        (extern "manool.org.18/std/0.2/all") in:
          let:
            Fact =
              proc { N } as:
                unless N.IsI48[] & (N >= 1 - 1) signal
                  (if (~)[N.IsI48[]] then TypeMismatch else InvariantViolation)
                else:
                  var { Res = 1 } in
                  do Res after
                  while N <> 0 do Res = N * Res; N = N + ~1
            in:
              Out.WriteLine[/* Out; */ "Factorial of 10 is "; Fact[10]$]

