wren icon indicating copy to clipboard operation
wren copied to clipboard

Add octal escape sequences

Open CrazyInfin8 opened this issue 3 years ago • 1 comments

This allows the use of octal escape sequences in string literals. Octal escapes are represented with a back slash followed by at least 1 and at most 3 octal digits. Octal escape sequences also cannot exceed 255 (the max value for an unsigned byte).

The two most common use cases for octal escapes are null bytes represented as\0, and ANSI escape sequences represented as \033 or \33 which is functionally similar to \e.

CrazyInfin8 avatar May 02 '21 02:05 CrazyInfin8

Well, now that we have both \0 and \e, I don't think that supporting octal escapes is worthwhile, particularly as - unlike the existing escapes - they would be variable length.

I just can't think of any other use cases for them in modern programming.

PureFox48 avatar May 02 '21 12:05 PureFox48