I know the following syntax does not exist, but what would be the
language-design implications of having syntax like this (using Austin's
example)?
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
Q string -> ({ model | model.primaryForecast.parameters.q = toMaybe
(String.toFloat string) }, message UpdateProduction)
De string -> ({ model | model.primaryForecast.parameters.de
= toMaybe (String.toFloat string) }, message UpdateProduction)
C string -> ({ model | model.primaryForecast.parameters.c =
toMaybe (String.toFloat string) }, message UpdateProduction)
UpdateProduction -> ...
This seems like a very natural extension of the current syntax; it looks
very easy to read/understand, and I don't see any ambiguity?
Thanks,
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.