4 ms·
I think it's a logical progression. In the future, all UI scripting will likely tend toward JS. After all, it's what the front-end devs know. It's easier to lea
by wladimir 15y ago
I think it's a logical progression. In the future, all UI scripting will likely tend toward JS. After all, it's what the front-end devs know. It's easier to learn for 'artistic types' than C++, Web frontend devs know it, and ActionScript is also JS-ish these days.
Note though, that you don't have to use the scripting framework. You can define your GUI simply in C++ if you want.
- ebiester 15y agoPoint of clarification: ActionScript and JavaScript are both dialects of ECMAScript. Now, it isn't just that JS is easier to learn for 'artistic types', but it really is a quicker development process than traditional C++. My worry would be performance, just like everyone else. If you have already decided that a web application isn't good enough, why are you going to be okay with the JS penalty?
- wladimir 15y agoFor the performance-critical parts you can still use C++. A web application does not allow that. Heck, as I said in my grandparent post, you can still use C++ for everything if "JS is not good enough". Most people in the real world care about development turnover time. And as you say, developing in Javascript is a lot quicker than in C++, so why not write the non-performance-critical parts in JS?
- ebiester 15y agoFunny enough, I have written a piece of a web application in C, connected by JNI. It's even easier with CPython. Certainly, you can't do that with client-side JS, but could you imagine mixing desktop-side JS and C++ in the view? That said, the piece that is in most need of performance in a desktop application is often the GUI itself. Imagine Microsoft Word taking a split second more when it updates the ribbon, for example. Perhaps there is an exception for desktop apps that need direct connections to hardware.
- wladimir 15y agoGames have used scripting for GUIs forever. If performance is important somewhere it's in games. So I wouldn't be worried at all if it is used for "boring" desktop apps. As long as the drawing is fast (which is the case, as it is handled by the GPU), it really doesn't matter in human time whether it takes 0.01ms or 0.001ms to react.