Re:Proton Native – React Native for the desktop
by mstade on Wednesday May 02, 2018 @03:00PM
(#16980122)
This seems like as much of a non sequitur as "skipping" syntactic elements. The comparison is clearly syntactic, and thus factually incorrect – the second example is in fact longer than the first.
Sure, if you swap in another example that is in fact shorter, then it'd not longer be an incorrect statement. Maybe I am indeed being silly, but it seems getting the hook-line-sinker arguments as right as possible is a worthwhile goal, particularly when at least one of them can be objectively verified.
If by "shorter" you mean "less complex" than stop saying "shorter" and start saying "less complex" instead – just as you say they aren't the same thing. It'd mostly be redundant I guess, given "easier to read" and "easier to edit" implies "less complex", but at least it'd be harder to immediately refute.
Re:Proton Native – React Native for the desktop
by jcelerier on Wednesday May 02, 2018 @05:54PM
(#16981487)
Here's an equivalent Qt example though, shortened like yours:
import QtQuick 2.7
import QtQuick.Controls 2.2
ApplicationWindow {
title: "Example"
Button { height: 300; width: 300; onClicked: console.log("Hello") }
}
look ma, 6 LOC !
But this whole discussion is silly. "Shortness" in code terms has much more to do with the number and complexity of statements, not LOC or characters. The JSX in there adds "noise" and characters, but the whole purpose is to simplify understanding code and make it readable. It's not adding any fundamental length.
The Proton example is doing a bit less than the Qt example, and for me that's a much more useful definition of shorter.