For eg:
String s = "A != B";
would render the ligature inside the string?
21–30 of 43 posts
For eg:
String s = "A != B";
would render the ligature inside the string?
I'm not sure that I want my equality signs to be ligature'd together. I feel like using this might mess up alignment in a monospace font.
What I would like to try is a language where = actually meant equality rather than assignment and a few other common operators like !=, ===, !==, = all appeared using the standard mathematical symbols at the same width as =, . That way, some related cases would naturally line up and most lines with comparisons would become shorter and less cluttered, which seems like a modest incremental improvement in language syntax. Alas, you’d also need software and keyboard input to support that in a way that made those alternative symbols effortless and entirely predicable to use. This feels like a job for a standardised programmer’s keyboard and AltGr, except that you’d need a standardised programmer’s keyboard for each of the different languages that already uses AltGr for other purposes, and at some point it all becomes more trouble than it’s worth.
I would be very hesitant to use this. It's not "more intuitive" as the author would like to think. In fact , our visual system has been trained to instantly recognize a!=b in code, and I read code a lot more often than Math formulas. Plus code is not math (e.g. 1+(a>0)), confusing = with == will lead to lots of errors etc. If I get used to this font on my machine, i will have a real problem when parsing code in anoth…
Citation needed.
>confusing = with == will lead to lots of errors etc
This is more about NOT confusing == with = -- and several similar characters than the opposite.
Sounds like you have thought of all kinds of arguments to not actually try it and see whether it's any good in practice -- which is how anything should be judged (unless it involves some huge risk). In other words, a priori rationalization.
>If I get used to this font on my machine, i will have a real problem when parsing code in another terminal/editor.
The above argument advices to forever stick to a lowest common denominator coding toolset, lest one has to ever try to work in other environment.
How about maximizing the performance one gets from their own, and most frequently used, environment, instead of "what-ifing" for foreign systems they might have to use 1/10 of the time or less?
Plus, having a tool at our disposal and getting used to it doesn't mean we can't also do without if needed. Especially if it's a small improvement, like the one proposed by the ligatures here, and not some totally different notion that we can't ever go back to how it was without it...
This isn't really what I thought it would be. I don't want != changed to ≠ because ≠ isn't a C++ operator. What I thought would be true ligatures ("tying together") of "&&" which could still be recognized as a pair of ampersands, but by being conjoined cleanly appear to be symbol in their own right, which is what "&&" is. However part of the value of ligatures is symbol tightness, which is defeated by the need for a…
A colored != is not a C++ operator either. It's about getting our minds to differentiate symbols faster, not about whether they exist as is in some language's syntax.
Does this strike anyone else as a gimmick? I'm not sure if parsing symbols is really the limiting factor when I try to understand code.
I would be very hesitant to use this. It's not "more intuitive" as the author would like to think. In fact , our visual system has been trained to instantly recognize a!=b in code, and I read code a lot more often than Math formulas. Plus code is not math (e.g. 1+(a>0)), confusing = with == will lead to lots of errors etc. If I get used to this font on my machine, i will have a real problem when parsing code in anoth…
> In fact , our visual system has been trained to instantly recognize a!=b in code Citation needed. > confusing = with == will lead to lots of errors etc This is more about NOT confusing == with = -- and several similar characters than the opposite. Sounds like you have thought of all kinds of arguments to not actually try it and see whether it's any good in practice -- which is how anything should be judged (unless…
Anybody else despise the look of many of these ligatures? One of the worst is the design of the ampersand.
I'm assuming this doesn't take care of context? For eg: String s = "A != B"; would render the ligature inside the string?