Jason (jcreed) wrote,
Jason
jcreed

I realized why concrete syntaxes that use whitespace to determine scope of grouping constructs (e.g. python, Haskell, coffeescript) bother me: they're like deBruijn levels (which number variables by counting how many binders you have to pass through to get to them from the root of the AST) rather than deBruijn indices (which number variables by counting how many binders you have to pass through to get to them from a use of them).

Although they're fundamentally isomorphic, I've always somehow found the disadvantage of deBruijn levels (that an expression has to be renumbered if it's moved somewhere else) to be more weird and annoying than the disadvantage of deBruijn indices (that you have to do some renumbering during substitution --- and I don't even know if this even has any analogue for brace-languages vs. whitespace-languages)
Tags: programming languages, syntax
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments