From: Brian Candler Date: 2009-12-09T07:29:58+09:00 Subject: Re: how about ruby's threads? Tony Arcieri wrote: > So, psst, I'm the author of Reia, so you can take my responses as > authoritative :) D'oh! I can't believe I missed that. My sincere apologies. > This is true, however those call semantics are what enable blocks. I > guess > you don't plan on having blocks. I was going to do them in a rather trivial way, just by passing the block as the first argument: f(a,b) { |c| d(c) } --> f(fun(c) -> d(c) end, a, b) That's on the observation that lists:map, lists:foldl and lists:filter all seem to take a function as the first argument. > I'm not sure how wild people are going to be about a > language with a Ruby-like grammar and single assignment. You're probably right. It's just a toy. The first things I plan to do are: - atoms in ruby syntax: :foo - hence :foo() is a regular function call - ditto a = :foo; a() - barewords which are not seen in LHS of match expressions are also implicitly function calls: foo ---> foo() foo "bar" ---> foo("bar") - io.write --> io:write() - def...rescue...ensure...end for function definitions (wrapping in a 'try' automatically if necessary) - || -> orelse, && -> andalso then see what it looks like. I'd also like to use the "..." syntax for binaries rather than lists, but that complicates matters when you have to write a = "hello" b = " world" c = <> -- Posted via http://www.ruby-forum.com/.