<dialog>
<p>Hello world</p>
<button>OK</button>
</dialog>
<script>
let dialog = document.querySelector('dialog');
dialog.querySelector('button').addEventListener('click', () => dialog.close());
dialog.showModal();
</script> Electron v2.0.2
Chromium v61.0.3163.100
Node v8.9.3v8 v6.1.534.41On the flip side Electron explicitly does not impliment confirm() and prompt() which made me furious.
So there is definitely truth in the general js=cluster-fuck sentiment.
Electron has native dialog APIs: https://electronjs.org/docs/api/dialog
- learn C++
- install a C++ compiler
- learn Qt
- install Qt
For the web, you just need a browser, and JavaScript & CSS is way simpler and with way more documentation (especially for beginners). And for a simple modal dialog, you'll end up with 20 lines of code with no need for any framework …
- learn html
- learn css
- learn javascript
- learn ui framework whatever
- learn what a transpiler is
- install node.js just to process your files
- learn how a client-server architecture works
- learn how to setup a web server
...
dude, you just don't know how deep this rabbit hole is
You need to learn HTML, CSS and JS, but that are orders of magnitude easier than C++. Many people using it doesn't even have any computer science training.
Everything else you said (transpiling, framework, webserver) is totally optional and context dependent. And absolutely not needed to write a modal … I wrote a personal website this year, and I didn't need a single of this. Of course they are useful if you want to write a professional web app, but so is unit testing, a CI server, or a build system. But this isn't necessary to do simple stuff on the web.
Writing a website has a incredibly low barrier to entry, that why so many people complain about web developers not being real devs.
If you think the web is harder to grasp that the C++ ecosystem, you're being delusional to say the least.
Learning Qt is much easier than the JS ecosystem. It's one intergrated package with no messing around and a very clear suggested structure to applications.
My coworkers still seem to want to hack everything in to main.js, can't understand react and one of the main libraries we are required to work with just doesn't integrate well with it at all. On the Qt side of things everything flows smoothly, the class architecture makes sense.
You need to realize the world you live in: while still useful for some specific applications, C++ is not a mainstream language anymore.
It still does nowadays, in 2018, and like any good CS degree it teaches lots of other programming languages and paradigms as well.
There is lot of room for learning during 5 years.
If a computer science class in 2018 only does language X or Y, it is indeed quite poor.
If a university wants to teach object-oriented programming, they can teach Java or C++. Guess which wins the decision in the majority of cases …
C++ isn't mainstream anymore, get used to it.
In 2018 C++ is the programming language driving Machine Learning, VR/AR, HPC, Fintech, GPGPU, WebAssembly, compiler research, OS research.
Which are all CS degree relevant subjects.
If you want to learn a specific language for whatever is currently cool on the job market there are vocational schools for that.
Python: 1991
JavaScript: 1995
> If a university wants to teach object-oriented programming, they can teach Java or C++
Or Python. Or Smalltalk. Or Ruby. Or...
IMHO you both go off the opposite ends: No, a generic "developer" isn't badly educated if they don't know C++, but that doesn't mean C++ is some irrelevant language. It's critical for some domains of computing, and widely used.
I never said it was irrelevant, I said it wasn't the mainstream it was in the early 90s. See my post above:
> while still useful for some specific applications, C++ is not a mainstream language anymore.
So are on the same line you and I :
> a generic "developer" isn't badly educated if they don't know C++
Try doing that in pure HTML/CSS/JS, you're basically left with a clusterfuck. There's piles and piles of libraries built to workaround this clusterfuck from Bootstrap to react-modal and even the best of them have worse APIs for this than Qt does.
Ultimately, drawing widgets just makes more sense for desktop applications than trying to hack document-oriented HTML to be a usable UI framework.
Don't get me started on layouts...