← Back to context

Comment by motorest

1 year ago

> The rewrite is about 80% feature parity, and is around 17k lines of code (not counting libraries like Vue/pinia/etc).

This is exactly where these comparisons break down. Obviously you don't need as much code to get passable implementations of a fraction of all the features.

It's definitely a good argument for not reinventing the wheel though.

I'd rather have 250,000 lines of code but 230,000 of that is in battle tested libraries. And of which only 20,000 lines are what we ever need to read/write.

  • I will frequently extract OSS style libraries out of our app and put them in a packages/ folder.

>> is about 80% feature parity, and is around 17k lines of code

You make a fair point that a basic framework can be expressed with much less code.

And that the remaining 20% probably contains more edge cases with proportionally more code.

But do you think the last 20% will eventually make up anywhere near 233k lines of code?

The real save here comes from rewriting: seeing all the common denominators and knowing what's ahead.

I mean, you can get basic implementations of Vue and state management libs in a few hundred (maybe thousand?) LOCs (lots of examples on the interweb) that are probably less "toyish" than whatever this person had handrolled