Skip to content

Reconsider string interpolation (#905) #1999

@fifn2

Description

@fifn2

Quick Summary:
Consider revisiting the string interpolation syntax (#905).

SSCCE

In react and other UI libraries, there's some kind of string interpolation.

function Interpolate ({ val}) {
  return <div>Interpolation of {val}</div>
}

Why not elm?

import Html exposing (div)
view model = div [] [text "Hello {{ model.name }}. Nice to meet you!"]

Of course, I'm new to elm so I don't really know much, but the way I see it, es6 JavaScript kind of has the upper hand when it comes to string interpolation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions