Comment

Comment by mr_mitm

Thanks for your insight, much appreciated!

However, regarding this:

> Much like operator overloading in other languages, catcode changes in TeX can indeed be misused and are sometimes confusing, but they're also a pretty useful solution to problems that would otherwise be tricky to solve.

I'm sorry, but I've never seen overloading of such fundamental characters like the comment character or escape character anywhere. Or at least if you use these characters inside a string, it's pretty clear that the string context is special. In LaTeX I have no way of knowing which catcodes a macro has modified without essentially parsing the entire thing, which breaks syntax highlighters and language servers (something that increases quality of life in other languages substantially), because the compile times are prohibitive. The decision to let users redefine %, \ and literally every character seems like a really, really bad idea to me.

Other languages and syntaxes seem to do just fine, so I'm not sure what you mean by tricky to solve.

> most of these are due to the fact that LaTeX is 40-year-old software built on a 50-year-old engine, and has remained backwards-compatible with documents throughout that entire time

I realize that, and I appreciate what LaTeX (and by extension TeX) has done. It's a giant in sciences and the software world, of absolutely critical importance, but still. We learned a lot of lessons about writing software in the last 50 years, and Typst is applying these from the ground up. Unfortunately I don't have a lot of confidence that LaTeX can be modernized.

parent mr_mitm 4 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton