If Ruby is object-oriented Perl, then Reia is object-oriented Erlang

  • Besides Ruby-like syntax how does it differ from parametrized modules?

    From his example:

    = Reia:

      class Foo
        def initialize(value)
          @value = value 
        end 
        def value
          @value
        end 
      end
    
    = Erlang:

      -module(foo, [Value]).
      value() -> Value.
    
    And it's actually prettier.

    Can you do some crazy pattern matching and type overloading like with Scala? Or is it just syntactic sugar for parametrized modules?

  • I wonder about "The canonical approach, Erlang records, are a goofy and oft reviled preprocessor construct with an unwieldy syntax." After writing a bit of Erlang code, I don't mind records that much. They're not prefect, but I would never call them bad, goofy, etc. They're also used in pretty much every situation where a state in a predefined form is needed (config files, server state, etc.) so that proplists are not needed (no need for dynamic list).

    So... what is the complaint about records really?

  • The title is correct, albeit vacuously.

  • undefined

  • Clearly the author knows Erlang almost as well as he knows Perl.