by Paul Stansifer
Unseemly is the first language able to safely typecheck all macros before expansion.

Typically, macro-based languages are untyped, and programmers in typed languages are rightly reluctant to use macros, because macros can make type errors incomprehensible. In Unseemly**, the code that macros generate is automatically typesafe, as long as the code the programmer writes passes typechecking, so it can have the best of both worlds. (This has historically been difficult, but recent research has cleared a path.)

If you want to implement a typed language, and the types are pretty normal, you can write the whole language as Unseemly macros. Not only is that faster than writing the language from scratch (you get the typechecker for free!), but Unseemly-based languages get to share libraries and even some tooling. (Tools like text editor support and a REPL should be shareable.)

Unseemly is utterly barebones, but it has the tools to grow a language.

letfn (fact n: Int) -> Int =
  if (equals? n 0) then one else (times n (fact (minus n one))) ;
in (fact 5)
Information updated 01/18/20
Note: This entry has not yet been moderated.
View Comments