In my opinion, this is actually the central motivation for the feature — 
minimizing the friction (both reading and writing) of embedding small snippets 
from other programming languages in Java sources. So this disadvantage is a 
pretty big one.  

That said, a library method to remove the piping (some variant of trimIndent) 
makes sense, so people who want to program this way can do so easily.  

> The only disadvantage I see in forcing a pipe prefix is inability to
> just paste a big snippet from somewhere to the middle of Java program
> in a plain text editor. 

Reply via email to