News for hackers. Stuff that matters.
Re:How to make smaller C and C++ binaries by lozenge on Sunday May 07, 2023 @04:00PM (#35855069)
This is like saying "how to reduce the load time of your web app - remove all CSS". Technically true, but not useful for most web apps. People can want faster loading without removing all styling.
Re:How to make smaller C and C++ binaries by Kranar on Sunday May 07, 2023 @04:38PM (#35855416)
I don't see how your claim follows or would be true. Replacing CSS with the equivalent JavaScript would most certainly not reduce load times. You should use CSS precisely as a means of reducing load times.
Re:How to make smaller C and C++ binaries by wtetzner on Sunday May 07, 2023 @05:27PM (#35855770)
They didn't suggest replacing it with JavaScript.
Re:How to make smaller C and C++ binaries by Kranar on Sunday May 07, 2023 @05:57PM (#35856000)
They didn't really suggest anything. Feel free to propose a way of replacing CSS functionality that results in faster load times.
Re:How to make smaller C and C++ binaries by dgfitz on Sunday May 07, 2023 @09:59PM (#35857298)
I'd say the obvious answer in this case would be: replace it with nothing. The web would be a touch uglier, but it sure would be faster.
Re:How to make smaller C and C++ binaries by Kranar on Sunday May 07, 2023 @10:06PM (#35857341)
That's a different discussion and frankly not something for developers to decide. If a product is designed to behave and look a certain way, then as an engineer you have the job of determining the best way to accomplish that objective. If your decision is to forgo using CSS for an alternative, fine but no one has provided what that alternative is.

I'd much rather use CSS instead of Javascript or going back to the days of hacking <table> to get a certain layout.

Re:How to make smaller C and C++ binaries by ipaddr on Sunday May 07, 2023 @04:15PM (#35855219)
It's more like saying remove react and use pure javascript.
Re:How to make smaller C and C++ binaries by colonwqbang on Sunday May 07, 2023 @05:54PM (#35855976)
I think that's quite unfair. The article contains many different tips on how to reduce size. Rewriting in a different language was just one of them, pretty far down on the list.

"Write in C instead of C++" is also clearly not the same as "remove all your code"...