3 ms·
Eh. I agree there's complexity in them, and that a lot of the ecosystem indirectly use them because of derive macros, but I wouldn't call it a wart, and the "sy
by spoiler 1y ago
Eh. I agree there's complexity in them, and that a lot of the ecosystem indirectly use them because of derive macros, but I wouldn't call it a wart, and the "syntax" for writing proc macros isn't that bad if you use the syn/quote crates. I agree that decl macros usually make me sigh and open the docs though
- nicoburns 1y ago> I agree that decl macros usually make me sigh and open the docs though Declarative macros are very like regex's: both in that at first they seem incredibly dense and arcane but once you work out how to read them they're actually very simple, and in that the syntax is literally similar in that it's a list of tokens that must match sequentially.
- pjmlp 1y agoIf regexp was simple there would not exist universities dedicating a semester to its theory and various implementation algorithms, alongside a famous quote. :)
- tialaramex 1y agoUniversities are teaching about the Regular languages and about Finite automata. So if we're saying this means regex isn't simple then - having observed that my University's Math course has two semester long Number Theory courses we must conclude that the integers aren't simple either, right ? And yet, the integers are simple enough that's where we start five year olds, by counting things. Simple and Shallow are not the same thing.
- pjmlp 1y agoIndeed they aren't, that is why math has such a bad reputation in most countries, already at basic school levels. Recent article this week in German press, as per IQB-Bildungstrend 2024 results, one third of students fail in math exams. Which reinforces the common culture that math is hard, and it is to be expected not to have great grades at it.