6 ms·
sigh First off, JS is a perfectly usable language. In some respects, it's even great: of the "big three" scripting languages (Python/Ruby/JS), it's the only on
by qwertyuiop924 10y ago
sigh
First off, JS is a perfectly usable language. In some respects, it's even great: of the "big three" scripting languages (Python/Ruby/JS), it's the only one that got Lambdas right, and also got closures right (unlike, say, Python). It has sometimes-quirky syntax, and some odd semantics, but they don't bite as often as you'd think.
Second off, I would say that this article is right about the bulk of Electron: It's a pretty massive thing to lug around with your app, and not ideal in any sense. However, if you want to build a UI very fast, there is nothing better than HTML/CSS for it. Except maybe TK.
Speaking of TK, I would actually advocate TK over Electron: it's easy to use, has bindings to pretty much every language out there, and with TTK, it doesn't look like crap.
Finally, "considered harmful" essays rarely do any good, and frequently do harm.
So yes, while I usually like Drew's writing (at least a little: he's good, but far from the best), I wish he had spent the time he spent writing this doing more work on SCAS.
Seriously. If SCAS was actually done, and documented, and usable, that would be great. There is a freaking vacuum of good assemblers for the platform: another one would be nice.
- MereInterest 10y agoNow I'm curious. What would you say is wrong with python closures? Asking because they feel natural to me, and I haven't run into anything irritating about them. (As opposed to lambdas, which are really annoying and restricted in Python.)
- qwertyuiop924 10y agoIt's not as bad as I thought, but Python doesn't actually have lexical scope, not really. But the LEGB rules mean that it should still work as you expect.
- TJSomething 10y agoIt does if you're using Python 3, which has the nonlocal keyword for lexical scope.
- qwertyuiop924 10y agoFinally. But that should really be default.
- Sir_Cmpwn 10y agoDo you mean https://github.com/KnightOS/scas https://github.com/KnightOS/scas? It's pretty much done. Documentation is lacking in the repo but there's a detailed man page.
- qwertyuiop924 10y agoOh, good. The repo's current documentation indicates that it's deeply unstable, which is why I drew that conclusion.
- Sir_Cmpwn 10y agoIt could probably stand to be updated. I'll do a pass on the readme now.
- qwertyuiop924 10y agoThanks.
- Roboprog 10y agoHello again, qwerty'. Thanks for stepping up on the JS issue :-) There are many good languages out there, "when used as directed". Alas, out here in the flyover country of Sacramento, there is really only demand for 3 kinds of jobs: Java, C#.NET (falling off), and some Javascript, ignoring the long tail of one-of-a-kind shops. Given those choices, I'll take the Javascript. Java 8 lambdas are clumsy to use to assemble much in the way of higher order functions. I mean, cuz, who doesn't want to put this as a parameter into a function/method header: (..., BiFunction<Map<String,Object>,Map<String,Object>,Map<String,Object>>, ...) E.g. - for the sake of argument, say I needed a callback to merge two associative arrays. Oh, you needed a third input argument? Write your own interface type, so you can use it to declare the callback parameter. No, I'll take the JS, thank you very much. (as we discussed a month or two ago, Java is a [somewhat] new Business Oriented Language, and it's pretty Common)
- Roboprog 10y ago... and it's been ages since I did any TK (tcl/tk) :-)
- qwertyuiop924 10y agoI don't do much, but it's always pleasant when I do. But where I my manners? Hi Robo. :-). It's been a while. Actually, it's been so long that I only hazily remember the contents of our discussion.
- SlySherZ 10y agoI couldn't agree more with this. Just the fact that functions are a first class type in JS already makes it better than many other languages. Another thing that JS is great at is the flexibility it provides: objects are very general and you can do almost anything with them. Anyone would care to explain why does JS take so much hate?
- qwertyuiop924 10y agoI can handle that. First off, it gets a lot of (undeserved) hate from the Java-type people who think they know what OO is, but don't (because Java isn't OO, or so says Kay, and even if it is, there's a whole lot of rubbish mixed in. For that matter, I don't think JS qualifies either, by Kay's definition, but it's closer). These are the people who say things like, "How can it be OO if it doesn't have classes?" and, "where are my Refactoring tools?" or "Design Patterns!" and implement a bunch of java-esque "classes," and proceed to write IteratorStrategyFactoryManagerService (speaking of which, if you have any actual "classes" in JS with the word "Strategy" in the name, indicating they implement the GoF Strategy pattern, you should stop now. And feel bad about yourself. But that's another story). With ES6, we have "classes," so these people can stop complaining, but it's still bad, because they're actually syntactic surgar over prototypes, so you still need to understand prototypes (to say nothing of how "this" works, a genunine mess in JS, but a necessary one), but it's no longer obvious that that's what's happening, so you might think that you don't. The more significant complaints are about Javascript's famous weak typing (quick, what's []+""? What about ""+[]? And {}+[]?), ASI (which is why if you're returning an object/array, you can't put the openbrace or openbracket on the next line, and why semicolons only sometimes matter), and general quirkiness (the aforementioned this, and so on). These are actually legitimate reasons to dislike JS, but in my experience, they're not as severe issues as they're made out to be. If you really can't take it, though, TS or Flow can help you.