Since Elm isn’t homoiconic like Lisp and because of a conscious choice by the creator messages are pure data.
What would you want that for in Elm? You can’t eval that. You chose a simple referentially transparent function without clojures… what happens to something like this?
endpoint = "/api/"
message =
{ callIt = \slug -> endpoint ++ slug
}
Do you serialize the whole program? Some part? What does that even mean? Do you restrict which functions can be serialized, wouldn’t that be annoying?
It’s complicated, I’d say. You could decide on some rule but to what end?