vefnfc.blogg.se

Java 13 text blocks
Java 13 text blocks






java 13 text blocks

They pointed to issues with the backslash being too lightweight typographically, and the “any number of quotes” rule being counter to a tool-friendly philosophy – among other feedback. In December of 2018, the proposal was withdrawn due to feedback from the community. It added raw string literals to Java to help developers avoid escapes – a common issue when writing strings. Raw string literals were to be introduced in JDK 12 as exploratory preview feature under JEP 326. The text blocks preview feature began as work on the (now deprecated) JDK Enhancement Proposal 326: raw string literals, and has culminated in a target standard feature release with JEP 378 targeted for Java 15.

java 13 text blocks

From Raw String Literals to Text Blocks (Standard) But first, how did we get here? What Are Text Blocks?įirst introduced in JDK 13, the text blocks Java language feature introduces a way for developers to predictably format multi-line string literals while avoiding most escape sequences. In this article, we look at the origins of text blocks, changes through JEP 355 and JEP 368, and how developers can start planning for text blocks with their introduction to the language starting in Java 15.








Java 13 text blocks