Recent

Author Topic: Identifiers character set  (Read 1792 times)

LV

  • Full Member
  • ***
  • Posts: 153
Re: Identifiers character set
« Reply #30 on: October 31, 2024, 07:09:02 pm »

What I think would be even more interesting and would not require any change to the FPC would be ligature support for Lazurus. You can take a look at FiraCode which is a ligature based coding font, that has ligature rules to for example make the two chars => to a sinlge arrow symbol. Or <= and >= become ≤ and ≥.
Also has some other rules, like centering colons or applying different spacing to the use of different symbols.

It's really nice and in editors that support it, it's now my default font. For anyone interested I can recommend to just download the font, and use it in an editor like VSCode or Notepad++ which supports ligatures (need to enable them in the options first, see the fira code wiki) and just open your source files with it.
At least for me it just makes it a joy to look at the code and it works well with nearly any language.


Thanks, very interesting.
I usually use Gvim as editor, out of IDE. This use a extended character codification called "digraphs". You digit Ctrl-K and then a digram as S* for greek sigma.
But all that systems, as in Lazarus or Delphi IDE, are annoying, as you say.
I remember that there are also programs to remap physical keys to arbitrary characters. I  have to find the name of them.


Perhaps, in this case, you should consider using the Neo keyboard. (This is not an advertisement) :)
https://neo-layout.org/

PascalDragon

  • Hero Member
  • *****
  • Posts: 5750
  • Compiler Developer
Re: Identifiers character set
« Reply #31 on: November 01, 2024, 10:07:11 pm »
Keywords should not use anything else than ASCII, because this way it's still possible to use the whole language on systems where Unicode is not easily usable (e.g. FreeDOS).

I for one am fine with that. Now about identifiers...

If we implement Unicode identifiers, FPC will follow the Unicode annex for this, because why reinvent the wheel... 🙄

 

TinyPortal © 2005-2018