Rubysyn: Clarifying Ruby's Syntax and Semantics

(github.com)

55 points | by petalmind 4 days ago

2 comments

  • Smalltalker-80 3 hours ago
    • pansa2 2 hours ago
      Yes, Smalltalk's syntax fits on a postcard - and it's possible to go even more minimal than that, e.g. Lisp or Forth.

      OTOH Ruby doesn't need a postcard, it needs a full poster.

  • SeriousM 3 hours ago
    > This is an experiment in clarifying some aspects of Ruby syntax and semantics. For that we're going to introduce an alternative Lisp-based syntax for Ruby, preserving Ruby semantics.

    Lisp? Then I would use Lisp...

    > The goal is to define a comprehensive, trivially-parsable and sugar-free syntax.

    Ruby has syntax sugar, no need to remove the funny parts.

    • petalmind 1 hour ago
      > Lisp? Then I would use Lisp...

      Lisp has completely different runtime semantics. Even the lexical scope in Ruby is extremely peculiar. One of the hard parts of writing this document was to remove the intuitive influence of Lisp because it just doesn't make sense for Ruby.

    • petalmind 1 hour ago
      > Ruby has syntax sugar, no need to remove the funny parts.

      This is just an intermediate representation, it's not meant to be used directly (even though you can do that, of course).