Indentation-aware multi-line string literals (and/or an equivalent compile-time function)
Adam D. Ruppe
destructionator at gmail.com
Wed Feb 26 23:26:31 UTC 2025
On Wednesday, 26 February 2025 at 23:18:10 UTC, WraithGlade wrote:
> There's an idea I've long wished was available in programming
> languages (off and on for many years whenever it occurs to me)
> that would likely be very simple to implement and yet also very
> useful in many contexts.
fyi OpenD shipped this last week:
https://dpldocs.info/this-week-in-d/Blog.Posted_2025_02_20.html#outdenting-heredoc-strings
here's my implementation in the compiler, as you can see it
wasn't hard:
https://github.com/opendlang/opend/commit/c2937ab3719ed0cb9589e0baa6f52a84a56ddb07
More information about the dip.ideas
mailing list