3 ms·
The only part of the Wuffs spec I just read that I dislike: Strings. I would really prefer strings to work like existing C and 'bash' style quoting. At least
by mjevans 6y ago
The only part of the Wuffs spec I just read that I dislike:
Strings. I would really prefer strings to work like existing C and 'bash' style quoting. At least the simple aspects of it, the parts of the rules that are easy to remember and simple. A string should always be a sequence of octets, but easily coerced by a casting operator to a numeric format from any index. I'm not sure what the syntax for that would be offhand.
- rattray 6y agoYeah, when I got to the bottom and saw that they don't have strings, I immediately decided not to spend any more time learning about the language. I'm not sure what I would want them to be like for this language, but I'd definitely want something.
- incrudible 6y agoIt isn't made especially clear on the linked page, but Wuffs is a language to write parsers with. It's not a "general purpose" language, though it might find use in other domains. If you've written a parser, you will have noticed that the built-in string types of other languages are counter-productive. You really want to work with plain ranges over bytes, and Wuffs offers that to you.
- incrudible 6y ago> I would really prefer strings to work like existing C... The way "strings" work in C is a big source of the kind of bugs that Wuffs is supposed to prevent. > A string should always be a sequence of octets, but easily coerced by a casting operator to a numeric format from any index The Wuffs language just uses "a sequence of octets" in favor of a string type.