riff-lang / riff

The Riff programming language
https://riff.cx
BSD Zero Clause License
23 stars 1 forks source link

Single-quote delimited sequences should be parsed as string literals #39

Closed darrylabbate closed 1 year ago

darrylabbate commented 1 year ago

Alternatively: character literals have been practically useless. While the implementation is neat, in practice, the Brainfuck example is the only piece of Riff code I've written that actually utilizes them. Also, most languages (especially high-level languages) don't support character literals delimited by single quotes, instead choosing to parse sequences in the form of 'abcdefg' as string literals.

However, while byte("c") is a suitable replacement for 'c', this only works for ASCII characters. Something like ord() needs to be implemented alongside this change.