3 ms·
Probably javascript. With the caveat that all of the work I've done in javascript has been of the old school "write it in a text editor and FTP it to the server
by krapp 9y ago
Probably javascript. With the caveat that all of the work I've done in javascript has been of the old school "write it in a text editor and FTP it to the server" variety, and I have little real exposure to the modern ecosystem or the problems people seem to have with javascript at scale.
I like the simplicity of the syntax. Arrays and objects are easy, closures are easy, and I like prototypal inheritance as a concept, although you're not supposed to actually use it in practice.
Lua is probably a close second, though. If I were to design a programming language, it would probably be somewhere between the two, with some C++ features tossed in for flavor (operator and function overloading, maybe generics.)
- erikpukinskis 9y agoI second this. I love ES5. It was a beautiful, simple language. And it runs just the same on literally every device. The JavaScript community has taken a horrible turn towards complexity. I’ve been planning a fork of the npm tree, to return to ES5. But it’s a big project and I want to be ready with a good modern, modular web toolkit before I do. (The plan is not just to fork an ES5-compatible tree, but to allow people to rewind the npm tree to an arbitrary branch mask based on any linting rule they like and append from there. If you want to narrow to only typescript+react packages with named exports for tree shaking, you could. I’m gonna do good old fashioned ES5 though, no promises allowed and no assignment in global scope)
- thepapanoob 9y agoi understand your love for javascript... but i dont understand the hate for es6 & upwards. ive rewritten all my code to atleast es2015 and lost so much overhead while doing it wich makes my projects alot easier to maintain. (and alot more predictable) the only thing wich is lacking right now is native support for it in the browsers
- erikpukinskis 9y agoPromises introduce declarative control structures basically between every function call in an async application, which is a nightmare for debugging. ES6 introduces way more syntax, making it much harder for beginners to learn. Arrow functions make scope much harder to reason about, which makes closures more of an anti-pattern. In ES6 closures are one of a tiny number of scope patterns so you can actually use them. Arrow functions cause bind to break in unpredictable ways. Most other ES6 features are just syntactic sugar which offer no software engineering benefit and add a whole layer of conflicting code styles that one must constantly switch between, or else deal with constant pointless linting fixes if you are adhering to a consistent standard. ES6 demands you use a transpiler which makes debugging flakier, and adds another place for bugs and maintenance work, in addition to often slowing he build down. If I wanted deal with that much headache I’d just use typescript and at least get type checking in exchange for the syntax change and transpile step. ES6 exists because some programmers never understood prototype and bind. And felt naming a function that is only called once was icky. Mostly former Ruby programmers. So they bolted a shitty Ruby onto JavaScript in order to get people to stop using prototype and bind, which are the heart of JavaScript’s control flow. Basically the chest burster from Alien.