3 ms·
The counter example for Svelte is remarkably terse.
by aarpmcgee 7y ago
The counter example for Svelte is remarkably terse.
- noahtallen 7y agoTaking a brief look at the react code [0] and comparing it with the svelte code [1], it appears the svelte code handles much less. For example the react example handles the following among others: - programmed to handle arbitrary conversion targets (probably the most verbosity here) - handles input validation - handles labels for inputs And some others. It would be very easy to spin up a similarly terse react example which doesn’t have that much bloat... I imagine it would also get bloated for Svelte as you handle more and more cases. I’d be interested to see a more complex Svelte example and a simpler react example. The WinForms example [3] would be super difficult to scale at any level because you’re hardcoding the location everywhere. I’d be interested to see a more modern UWP app on there to compare :) I do really enjoy the abstractions React provides. I never experienced something quite like it in my time developing native iOS, Android, or Windows apps. I think bloat on the web is horrible for users for sure, but part of that is a lack of a better target for web development. You’re effectively stuck with some flavor of interpreted JS if you intend to build a complex interactive application on the web. It’d be nice if there was a compiled alternative. Plus, way too many people try to make their simple websites dynamic. If it’s static, render it server-side. - [0] React code for temperature conversion (https://github.com/andreasgruenh/7guis/blob/master/src/screens/temperature-converter/TemperatureConverter.js https://github.com/andreasgruenh/7guis/blob/master/src/scree...) - [1] Svelte code for temperature conversion (https://github.com/sveltejs/v2.svelte.dev/blob/master/content/examples/7guis-temperature/App.html https://github.com/sveltejs/v2.svelte.dev/blob/master/conten...) - [3] WinForms C# code (https://github.com/eugenkiss/7guis/blob/master/C%23-WinForms/temperature/temperature.cs https://github.com/eugenkiss/7guis/blob/master/C%23-WinForms...)
- thrower123 7y agoWith Winforms you can avoid almost all the pixel-fiddling with FlowLayouts and TableLayouts. With Dock and autosize properties it's almost as responsive as HTML/CSS in about 1/10 the fuss.
- merlincorey 7y agoUnfortunately GUI programming across multiple languages is not as amenable to unit testing. I guess if you specify the geometry as part of the 7 Tasks[0] one could automate testing of these. [0] https://eugenkiss.github.io/7guis/tasks https://eugenkiss.github.io/7guis/tasks
- genezeta 7y ago> it appears the svelte code handles much less. I think the perspective that the react code does much more explains the problem better. I mean, the definition of the task does not ask any of those extra things. If people don't adhere to the precise description of benchmarked task the comparison will never be any good.
- true_religion 7y agoPerhaps, but the mobx example was written by the person who created the challenge, and they are seeking to update their challenge to include more complexity. Maybe this is a first step.
- barbarbar 7y agoAlso the temperature example in Svelte was very terse. Compared with fx react/mobx.