Hacker News new | past | comments | ask | show | jobs | submit login

It's great you applied your vanilla JS skills to his totally metaphorical example.

I still don't get why it's okay for every other programming language to use the STL or huge dependencies, but doing so with javascript is frowned upon for some people. You wouldn't write a JSON parser yourself in CPP, you'd install something from conan or use the STL or boost for that. Why is it so bad to do the same with js?




The browser does supply a huge number of APIs.

To set one of the Minesweeper tiles to bomb, you could do:

tiles[x][y].className='bomb';

And you are done. The rendering will nicely take place according to what you defined in the CSS.


What are you talking about? You're just talking about simple class manipulation which has nothing to do with actual reactivity, especially 2-way data binding.

How would you support that with your "templating engines" you keep mentioning, which to me doesn't mean anything at all, in my understanding of what a templating engine is like handlebars.


As I said, I would not use a template engine to write Minesweeper.


So when I click a tile you have some code on the onclick handler to go update the counter at the top? Sounds messy if there are multiple things you need to update when some data changes.


Not the end of the world, but the client will have to download it.


So what. Gzip is a thing. Most apps I build with react don‘t reach the 1MB mark even if they‘re gigantic.


It's well known there's a sharp drop off of visitors for every extra hundred milliseconds a site takes to respond.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: