https://issues.dlang.org/show_bug.cgi?id=23376

--- Comment #2 from Bolpat <qs.il.paperi...@gmail.com> ---
(In reply to Dennis from comment #1)
> I don't like enhancements based on hypothetical users. Are there actual
> users running into this limitation?
> 
> My impression is that it's a rarely used feature, but it's not very
> intrusive either so there's no pressure to remove it either. I could be
> wrong though.

I have no idea how often it’s used. I just read over the spec and it said
multi-code-point entities aren’t supported. I wondered what it said, when I
tried using one and it said the same as if using some non-HTML5 one.

Maybe the reason for not supporting them is they’d be the only escape sequence
to introduce multiple code-points, thus counting the number of code-points /
code-units becomes non-trivial: One would have to know the entities. I have no
idea why exactly this is an issue, tho. If I need the size of a string literal,
I won’t count the characters manually but assign it to an `enum` and ask its
`length`.

> > Even if this enhancement is rejected, the compiler should at least 
> > recognize 
> > HTML5 multi-code-point entities and emit a specific error
> 
> If we maintain code to recognize such entities, we might as well support
> them no?

Exactly. The error message effectively says that the entity does not exist, but
that is incorrect. It’s akin to “‹name› does not exist in this scope” versus
“‹name› cannot be used in this context”.

(It reminds me of the binary literals debate; when recognition and error is
harder than recognition and support, the way to go is clear.)

--

Reply via email to