Very nice idea, but I can see some roadblocks
# STDIN/STDOUT performance
People claim that io performance of erlang worth more attention from
Erlang VM
developers. It's not the problem of Reia in any way except for CouchDB
ViewServer
implementation candidate, who's responsible for stdin-read/process/
stdout-write cycle.
Hope this is way better in R13 (still fails to install on both mine
PPC/OS X 10.4 and x86-32/Ubuntu 9),
but haven't found anything concerning io on Changelist except for
Unicode changes.
# Cosmetic.
Reia currently lacks easy property access, such as:
doc.prop
and that can only be done with a Map access syntax:
doc[:prop]
JS:
function(doc) {
if (doc.user_id) {
emit(doc.user_id, null);
}
}
Reia:
def f(doc)
if (doc[:user_id])
emit(doc[:user_id], nil)
end
end
but i'm sure something elegant and powerful can be used instead since
Reia allows:
- to just return, and skip emit() calls;
- skip all this function(doc) junk;
and implement the same just like this:
doc[:user_id] if doc[:user_id]
but i'm sure
doc.user_id if doc.user_id
looks a bit cleaner and easier to type
//
But i'm sure both these won't stop the Brave One from his major night
implementing a ViewServer for CouchDB!
I've taken a look over map/reduce examples, all of them will look much
more compact in Reia (less typing = faster coding)
Cheers, Phil