Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8286021

Compiler Implementation of JEP-JDK-8273943 String Templates (Preview)

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Draft
    • Priority: P3
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      This is part of the preview feature String Templates. The new APIs do not conflict with existing APIs or behaviour and do not require any class file changes.
    • Interface Kind:
      Java API, Language construct
    • Scope:
      SE

      Description

      This is the compiler CSR for JEP-JDK-8273943 String Templates (Preview)

      Summary

      Enhance the Java programming language with string templates, which are similar to string literals but which contain embedded expressions that are incorporated into the string template at run time. This is a

      preview<br /> language feature and preview API

      .

      Problem

      The primary goal of this JEP is simplify writing Java programs by making it easy to express strings that include values computed at run time.

      Solution

      Introducing string templates will allow users to inject values into a String in situ. The use of string templates versus string interpolation allows for a richer feature that, in addition to composition, allows validation and non-string result transformations.

      Specification

      The following APIs have been modified (changes highlighted in green):

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlaskey Jim Laskey
              Reporter:
              jlaskey Jim Laskey
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: