-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.json
6 lines (6 loc) · 2.73 KB
/
params.json
1
2
3
4
5
6
{
"name": "Unseemly",
"tagline": "Macros have types!",
"body": "_Unseemly is still missing some vital pieces. The text below is not yet true._\r\n\r\nTypes are great! Macros are great! But they have historically not played well together.\r\n\r\nUnseemly is (to my knowledge) the first typed macro-based language.\r\n\r\n### Typed languages and macro-based languages\r\n\r\nI like to divide the design of programming languages into two main families. \r\nThere are other, no-less-valid, ways of looking at them,\r\n but this one appeals to me.\r\n\r\nOne family, the typed languages,\r\n includes the MLs and Haskell, as well as C++, Java, Rust, and so on.\r\nProgrammers in those languages use type systems\r\n to both describe data they are interested in and to express invariants.\r\n\r\nThe macro-based languages are a smaller family.\r\nThese are mostly direct descendants of Lisp: Scheme, and Racket, etc.\r\n(If you squint, the dynamic metaprogramming systems of Ruby and JavaScript\r\n make them part of the family, too.)\r\nProgrammers in those languages use metaprogramming to \r\n abstract over surface syntax, control flow, and binding.\r\n\r\nBut if you write in a typed language, \r\n you almost certainly hear the advice to use the macro system sparingly.\r\nAnd Lisps (usually) lack a type system altogether.\r\nWhy?\r\nType errors in macro-generated code \r\n are incredibly difficult to understand.\r\n\r\nThis is no small issue.\r\nType errors are the user interface of a typed language;\r\n the primary purpose of types is to produce useful error messages.\r\n\r\nRule that I just made up:\r\n If the programmer is responsible for generated code,\r\n code generation is not an abstraction.\r\n\r\n### Unseemly\r\n\r\n(Here's where I start making bold claims,\r\n which could all be undone \r\n if there's a theoretical error in Unseemly's design.\r\n But the vast majority of Unseemly\r\n is stolen from existing languages or at least existing research.)\r\n\r\nIn Unseemly, macros always generate typesafe code,\r\n so macros feel solid, like built-in language parts or Scheme macros, \r\n and the typechecker can only complain about the code you wrote.\r\n\r\nAnd Unseemly doesn't cheap out on the macro or type systems!\r\nThe macro system is procedural, hygienic, and has access to syntax quotation.\r\nThe type system is algebraic, sound (I hope!), and has access to pattern-matching.\r\n\r\nIf I'm making this sound magic, it's not; \r\n it relies on the macro definitions being well-typed,\r\n just like code normally relies on libraries being well-typed.\r\nWell, there's a lot of technical stuff behind-the-scenes,\r\n but, like I said, it's mostly stolen.\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}