FAQ

From Reia

Jump to: navigation, search

Contents

How do I write "Hello, world" in Reia?

Like this:

Main.puts("Hello, world!")

(Note: the need for Main is temporary and will go away soon)

"Hello, world" is nice and all, but where are more examples?

There are a number of Reia examples on github. If that's not enough for you, Reia's core types are self-hosted in Reia

Why didn't you just adopt Ruby's / Python's / Erlang's syntax outright? This isn't what I'm used to!

Reia isn't Ruby. It isn't Python. It isn't Erlang. It's somewhere in the middle. The syntax must reflect this. Neither Python nor Ruby have pattern matching or receive statements, but Erlang does. Python doesn't have a case statement, but Ruby and Erlang do. Ruby doesn't have list comprehensions, but Python and Erlang do. Ruby has first class regular expressions, and neither Python nor Erlang do.

Reia's syntax is closer to Ruby and Python than it is to Erlang, but the syntax is intended to encompass all the features available in Erlang. This has required compromises such that the syntax for no one of these three languages is suitable for Reia itself.

Why does Reia support destructive assignment? Doesn't that break Erlang's concurrency model?

Reia supports the ability to rebind new values to the same variable name, even if that variable is already bound. Contrast this to Erlang, which has single assignment and doesn't let you rebind new values to the same variable name. This is, to date, the most controversial feature of Reia.

However, none of the concurrent features of Erlang depend on single assignment. Reia implements destructive assignment by transforming code to Static Single Assignment form which is formally proven to be equivalent to the Continuation Passing Style of functional languages. In other words, Reia is still fundamentally a functional programming language even though it provides destructive assignments.

Most programmers are used to destructive assignment and therefore supporting it makes programming in Reia easier than programming in Erlang. Reia also implements a number of its own language features as destructive assignments, such as assignment operators and magic rebinding.

Who's behind Reia?

Reia is a open source project lead by Tony Arcieri, a software developer from Boulder, Colorado.

Tony's blog is available here: http://unlimitednovelty.com

You can follow Tony on Twitter here: http://twitter.com/bascule

You can follow the development of Reia by reading the Google Group.