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
There is no way to define a string interpolation template separately from the interpolation, nor to compose multiple templates. Thread. It was suggested by Miles that
It'd be nice if we could get that back and write something like,
// Inferred type should be Int => String
final val template = s"""This is string $(_:Int)."""
Then all of your examples boil down to function application and/or composition.
to which eugene said "Could you submit an enhancement request for that please?", a request which I am presently fielding.
The text was updated successfully, but these errors were encountered:
The thread suggests more could be done with names in a StringContext, so this is not a duplicate of #7715. cmp"$smaller is smaller than $bigger"(x,y) where the cmp does the obvious computation and makes the args available to the template by name, as it were from the context local to the StringContext.
That "etapolation" coinage might be the best I ever manage; except for the "intersobralator" used by implicitNotFound.
There is no way to define a string interpolation template separately from the interpolation, nor to compose multiple templates. Thread. It was suggested by Miles that
to which eugene said "Could you submit an enhancement request for that please?", a request which I am presently fielding.
The text was updated successfully, but these errors were encountered: