4 ms·
> Richard Cattermole has been adding them to D's C support, requiring 6000 lines of code!! I wondered if you were implementing a normalization (which is compli
by lifthrasiir 3y ago
> Richard Cattermole has been adding them to D's C support, requiring 6000 lines of code!!
I wondered if you were implementing a normalization (which is complicated), but that doesn't seem the case? I have read the PR and it's clear that it solves multiple issues at once: no start-continue distinction (bug), a code generator, the table itself (which is just an inefficiently formatted block of data). 6000 lines of code just for Unicode identifiers are simply an exaggeration.
- WalterBright 3y agoThere are different ways to count lines. I included in the C parser count the comment lines. 6000 is also a round number, I did that deliberately to imply the number was not exact.
- lifthrasiir 3y agoA new generated code alone is 4000 lines long [1]. The actual code added is just 2000 lines, and some are used to pay debts, I mean, to make a proper code generator. It is debatable whether that generator should count in the number of lines, since you can always write a generator in a simpler scripting language (for example, Rust uses Python to generate the `unicode-xid` crate). In any case however it is far less complex and, in my opinion, much smaller than the entire C parser proper. [1] https://github.com/dlang/dmd/pull/15307/files#diff-3677bcc896b4eacdde46b6df9ddfd0be58e388de66016b53d2f4fcbc5cefab84 https://github.com/dlang/dmd/pull/15307/files#diff-3677bcc89...
- mhh__ 3y agoMost big PRs are only big because pull requests are a fundamentally bad model for doing work that's already been planned.