Cascadia-code: ~= ligature

Created on 20 Sep 2019  路  10Comments  路  Source: microsoft/cascadia-code

Same as [== ligature] #46
The distinction between "=" and "~=" is quite subtle too.

Issue-Feature

Most helpful comment

hmm, what language does cascadia target? because some languages do ~= as a variant of == but other languages do ~= as a variant of != (not equals)

Making it look like an equality test makes those languages harder to read, they should be clearly distinguishable from equality tests.

All 10 comments

Cascadia Code:
20190920_114620

Fira Code:
20190920_114634

They look distinct enough to聽me.

hmm, what language does cascadia target? because some languages do ~= as a variant of == but other languages do ~= as a variant of != (not equals)

Making it look like an equality test makes those languages harder to read, they should be clearly distinguishable from equality tests.

Mm

Mmm

@seanmars @weltkante Interesting. For Lua (and related languages), would swapping for a not equals ligature be workable? Like this:

Screen Shot 2019-09-23 at 3 10 39 PM

I can certainly include a stylistic set variant that forces the not equals form. It'll require Terminal to build in intelligence to turn on the set when in Lua (and using Cascadia Code). @DHowett-MSFT, what do you think?

We can't exactly guess when Lua's in use in the terminal, so this would be another user-driven choice. :smile:

I think that consistent behavior is less confusing to the user. 馃槃

Well, VS聽Code could support something like:

"[lua]": {
    "editor.fontStylisticSets": "luaNotEquals"
}

I think the defaults should be easily distinguishable from other operators and any language specific cases should be opt-in. When you are in a terminal you don't know which language you are showing (for example piping source code file sections to stdout via command line tooling is a common operation for me) and you want to make sure that the user can easily read everything regardless of which language he uses in his files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pmartin-brierley picture pmartin-brierley  路  5Comments

Taomyn picture Taomyn  路  3Comments

hansswolfs picture hansswolfs  路  3Comments

rivy picture rivy  路  5Comments

xmha97 picture xmha97  路  3Comments