4 ms·
V8 is a great scripting engine on its own. I've been using it to allow some runtime scripting in my C++ App, which also makes things a lot easier to debug. It's
by mschuetz 9y ago
V8 is a great scripting engine on its own. I've been using it to allow some runtime scripting in my C++ App, which also makes things a lot easier to debug. It's always nice to see improvements to it, especially since I'm considering to do some core features, such as the rendering pipeline, through js bindings instead of C++. Would make it easier to quickly prototype, test and benchmark different OpenGL calls, shaders, etc.
JS has also become nice to work with since ES6. Incredibly easy to set up a working environment, amazing debugging capabilities, you can just change a few lines and instantly get to see your result by pressing F5, etc.
The only really big downside is that static typing is missing, but right now I'd rather not have static typing than go through the additional hoops of setting up transpiler builds. I'd probably switch to typescript if it was natively supported by browsers and V8, but JS is just fine till then.
- sifoo 9y agoThere are several leaner alternatives for application scripting, is it really worth dragging V8 around to get that capability? Lua would be one alternative. The reason I'm asking is that I'm working on a more Forth-inspired alternative[0] for application scripting myself, and I'm curious about the reasons for defaulting to the crappiest language ever invented and an implementation controlled by one of the biggest corporate bullies around. [0] https://github.com/basic-gongfu/cixl https://github.com/basic-gongfu/cixl
- mschuetz 9y ago> defaulting to the crappiest language ever invented Since we're trolling now, there is plenty worse around, like Python(the only language that manages to have worse scoping rules then pre-ES6 javascript, which is quite a feat), Cobol and LUA. JS ES6 is just fine. The trick is not to use the crap parts.
- sifoo 9y agoNot my intention at all, I have been writing code for 32 years, including several years of web/JS and I have yet to come across anything worse. If you can't even deal with other people having different perspectives on your choice of technology without calling them trolls, maybe you should consider untangling your identity from your choices.
- joquarky 9y ago> but right now I'd rather not have static typing than go through the additional hoops of setting up transpiler builds Agreed. I've found that using JSDoc with an IDE that supports validating against it is the best of both worlds.