By the DSL, guess what I am reading
I am toying with this DSL:
recieve: message msg as ChangeAddressMessage if msg.AddressId is null: transaction: address = Address.FromMessage(msg) address.Create() message msg as ChangeAddressMessage: transaction: address = LoadAddress(msg.AddressId) Address.FromMessage(address, msg) address.Save() message other: raise MessageNotUnderstood()
What book am I reading now?
Comments
The Yellow Pages
Ha ha gotcha.
Joe Armstrong's book on erlang (which I've just read).
Hehe, yeah.
I am going to finish it and post about, very interesting.
That DSL is just gibberish to me. The only thing I could parse was MessageNotUnderstood().
What is that trying to accomplish?
I thought DSLs were supposed to present something that a mere mortal (non-IT user) could understand.
Heck, I can barely understand that. I think old if(){ } statements would better. I've had luck in the past showing well-constructed, simple business logic in C# to non-IT folks and having them understand it.
It seems like this might be preferable:
public void OnReceive( Message message )
{
}
Blasted whitespace stripping...
Chad,
There are several purposes for creating a DSL.
This is not one that I will show to a business user, it is something that I want to do for myself.
The idea here is that the receive / message primitives are going to handle non-blocking waits on the thread, erlang style.
This is very powerful concept when you are talking about concurrent programming
enterprise integrations patterns...great book
haha..looks like i should have read the other comments first..lol
i'd like to hear what you thought of the erlang book..been eyeing it myself..
Comment preview