Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> All of the code is OOP-based, and they mount DOM nodes the old-school way (which is what React was supposed to solve..)

I don't know about VS Code, but I remember Atom was refactored to use manual DOM updates because the performance penalty of using React wasn't worth it.[1] By the way, isn't OOP by far the most popular paradigm for building desktop UIs? I imagine VS Code is a difficult codebase to work with that has a lot of intricate code (as is usually the case with large software projects), but that's a strange piece of criticism :-)

1. https://github.com/atom/atom/pull/5624



I have spent a great deal of time wading through the VS Code codebase and it takes OOP to the extreme. There are mile long inheritance chains, everything is a class, and it is a giant bowl of spaghetti. To some extent, I understand why they used that development approach. It doesn't use a UI framework, just DOM APIs, so classes make sense in lieu of components, but it's still bonkers.

> By the way, isn't OOP by far the most popular paradigm for building desktop UIs?

Yes, but I wish it wasn't. My day job is desktop development (with Electron), and I avoid OOP as much as I can and try to use a functional approach. After jumping all over the VS Code codebase to try to understand how some of this stuff works, and seeing how hard it is to navigate, I think heavy OOP is a bad idea.


Always interesting to hear such claims when graphic editors like Penpot, which have much tighter perf requirements than editors, are so fast while using React.


How do you implement a text editor?

I think a lot of people don't consider how complex text editors are and then there are the complexities of an IDE, or extensions, to be able to interact with it.

ropes? gap buffers? https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...

how vscode does it,

- https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...

- https://en.wikipedia.org/wiki/Piece_table


I'm not saying text editors are on the last place in terms of perf requirements.

I'm just saying, that general graphics editors is above that and do just fine with React.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: