Rubysyn: Clarifying Ruby's Syntax and Semantics

(github.com)

57 points | by petalmind 4 days ago

2 comments

  • Smalltalker-80 3 hours ago
    • amomchilov 1 minute ago
      I never understood the appeal of this talking point. It’s just an accounting trick that moves the complexity to the standard library.

      For example, SmallTalk is a class based OO system, yet this postcard doesn’t slow you how to create a class.

    • 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 2 hours 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 2 hours 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).