December 07, 2020
Are there suffices (suffixes?) for character literals?

Is there a more succinct of writing "the literal 'x' as a dchar" than dchar('x')?

I didn't see anything https://dlang.org/spec/lex.html#characterliteral but figured I'd ask the community
December 08, 2020
On Monday, 7 December 2020 at 22:26:52 UTC, Ben Jones wrote:
> Are there suffices (suffixes?) for character literals?

nope.

> Is there a more succinct of writing "the literal 'x' as a dchar" than dchar('x')?

You should rarely need to since there's implicit casting. but I think that is the best way if you do need to.