Hacker News new | ask | show | jobs
by internet_points 1 day ago
could've guessed staying away from xdisp.c was a good idea, cf. the "Buttery Smooth Emacs"[0] post:

> Keep in mind that Emacs xdisp.c tries to support five different toolkits (including two different major versions of GTK) with #ifdefs. There is no runtime abstraction. We define three or four different versions of each damn function. It’s a nightmare.

[0] https://gist.github.com/ghosty141/c93f21d6cd476417d4a9814eb7...

1 comments

"No runtime abstraction" seems the correct approach for good performance.

Run-time abstractions should always be avoided when the problem can be solved at compile-time.

While the conditional compilation syntax of the C/C++ preprocessor is not nice, good programming text editors can make it much more readable, by highlighting/hiding appropriate text sections.