Yes, so we can go back to writing a hundred lines of imperative code to render hello world.
Yes, so we can go back to writing a hundred lines of imperative code to render hello world.
But more importantly it's really not about the lines you code write once, or very few times in comparison -- it's about the computer does any time the application starts up on any machine, or any user does something. Obviously, to an extent. You wouldn't write a thousand lines of code instead of 100 to make something that is already very fast 10% faster. But I certainly would write 10 line instead of 1 if it meant the code is 10 times faster. It's just typing after all.
11 for the HTML document template
7 for the boilerplate package.json
3 more for the scripts addition to package.json
3 more for the “devdependencies”
20 for main.js
from: https://electronjs.org/docs/latest/tutorial/quick-start
A fairer assessment would be C++ with Qt to be honest though.
build with e.g. gcc hw.s `pkg-config --libs gtk+-3.0`
.globl main;main:
push %rbx
xor %esi, %esi
xor %edi, %edi
call gtk_init@PLT
lea .HW(%rip), %r8
xor %edx, %edx
xor %esi, %esi
mov $2, %ecx
xor %edi, %edi
xor %eax, %eax
call gtk_message_dialog_new@PLT
mov %rax, %rbx
mov %rax, %rdi
call gtk_dialog_run@PLT
mov %rbx, %rdi
call gtk_widget_destroy@PLT
xor %eax, %eax
pop %rbx
ret
.HW:.string "Hello World!"