You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe only String and Number are directly supported when using string interpolation (please correct me if I'm wrong)
It would be very convenient to support at least three other things:
Bool
Record
Enum
If there are others that make sense they can be considered too.
recordPoint2D {
x : Number,
y : Number
}
componentMain {
funcomponentDidMount {
/* this works */Debug.log("number: #{2}")
/* This errors with errors with "The expected type is `String`" Why does only Number have implicit coercion? */Debug.log("bool: #{true}")
/* Predictably this also errors with "The expected type is `String`". It would be nice if we could pretty print a nice json object string somehow */Debug.log("record: #{Point2D(0,0)}")
/* enums could be nice too */Debug.log("enum: #{Maybe::Just(Point2D(0,0))}")
}
funrender : Html {
<div/>
}
}
The text was updated successfully, but these errors were encountered:
I believe only
String
andNumber
are directly supported when using string interpolation (please correct me if I'm wrong)It would be very convenient to support at least three other things:
If there are others that make sense they can be considered too.
The text was updated successfully, but these errors were encountered: