"Simplify the task of writing Java programs by making it easy to express strings that span several lines of source code, while avoiding escape sequences in common cases.".The draft JEP currently lists three "Goals" of the JEP and I've reproduced the first two here: This is a follow-on effort to explorations begun in JEP 326, Raw String Literals (Preview). A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in predictable ways, and gives the developer control over format when desired. Its "Summary" section states:Īdd text blocks to the Java language. The draft JEP " Text Blocks (Preview)" provides detailed overview of the proposed preview feature. Laskey explains the most recent change to the draft JEP, "The most significant change is the renaming to Text Blocks (I'm sure it will devolve over time Text Literals or just Texts.) This is primarily to reflect the two-dimensionality of the new literal, whereas String literals are one-dimensional." This post-" raw string literals" draft JEP previously referred to " multi-line string literals" and now refers to " text blocks." Laskey's post opens with (I've added the links), "After some significant tweaks, reopening the JEP for review" and he is referring to the draft JEP that was started after the closing/withdrawing of JEP 326 ( JDK-8196004). In the post " RFR: Multi-line String Literal (Preview) JEP " on the OpenJDK amber-spec-experts mailing list, Jim Laskey announced a draft feature JEP named " Text Blocks (Preview)" ( JDK-8222530).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |