5 ms·
There are no "good" programming languages (excepting, perhaps, Prolog, Lisp, Smalltalk, or APL). There are merely many languages that are less bad. Javascript
by angersock 13y ago
There are no "good" programming languages (excepting, perhaps, Prolog, Lisp, Smalltalk, or APL). There are merely many languages that are less bad.
Javascript only has so much room for the bad to hide in--it's a little quirky, but isn't half as open to WTFs as, say, C++ (any generation thereof).
Don't be hating just because these new kids don't have to bang their faces into machine code or shitty C macros--it's great to have a way of trying different programming techniques for embedded systems.
- cbsmith 13y ago> Javascript only has so much room for the bad to hide in--it's a little quirky, but isn't half as open to WTFs as, say, C++ (any generation thereof). You know, I only know JavaScript about a fraction as well as I know C++, and I can say with a great deal of confidence here... no. C++ has lots of WTF's in strange little corner cases (mostly around the C compatibility issue). C++11 has done a good job of cutting down WTF's. In JavaScript you needn't go to the corner cases... it's right there in the normal cases. We're talking about a language that still doesn't have a standard way of reading and writing bytes... for talking to hardware. Think about that for a moment. > Don't be hating just because these new kids don't have to bang their faces into machine code or shitty C macros--it's great to have a way of trying different programming techniques for embedded systems. Honestly, I'd not have blinked if the idea was to use Java (even with its lack of unsigned arithmetic), C#, Objective-C, Lua, or even say Go to do the job. I mean, you need to use some kind of a language and you want it to be something that a lot of programmers will find accessible. But picking JavaScript for this job is kind of like picking Forth to build the new, more accessible database query language...
- TheZenPsycho 13y ago"We're talking about a language that still doesn't have a standard way of reading and writing bytes... for talking to hardware. Think about that for a moment." Wrong. Javascript has typed arrays. When's the last time you actually looked at Javascript? 1998? "Honestly, I'd not have blinked if the idea was to use Java (even with its lack of unsigned arithmetic), C#, Objective-C, Lua, or even say Go to do the job." They are using lua. They just have a front end to lua that uses javascript syntax, it would seem. Because languages without curly braces are scary, and the goal is to make this stuff accessible. To the expert, making your niche accessible to plebes is scary. I understand.
- cbsmith 13y ago> Wrong. Javascript has typed arrays. When's the last time you actually looked at Javascript? 1998? See comments here: https://news.ycombinator.com/item?id=6468339 https://news.ycombinator.com/item?id=6468339 As recently as a few months ago I had to base64 encode a binary protocol because the JavaScript guys couldn't handle decoding the raw bytes. > They are using lua. Yes, but it seems like lua is merely used as a target rather than a programming language. What language people actually code in is highly relevant if your goal is to make a domain more accessible. > They just have a front end to lua that uses javascript syntax, it would seem. Because languages without curly braces are scary, and the goal is to make this stuff accessible. There are a lot of languages with curly braces that aren't half as scary as JavaScript. > To the expert, making your niche accessible to plebes is scary. I understand. I appreciate your "understanding". Next time you are trying to make the big "I can read your mind" power play, you might want to read the context a bit more carefully. I don't generally do programming that talks directly to hardware, so even by your rationale I have no reason to be threatened, and I'm all for making this niche more accessible. I've seen excellent jobs of making hardware accessible to novice programmers using Java, Smalltalk, and even things like SCRATCH and Alice. I think that stuff is great. As you put it, "making a niche accessible to the plebes" is a great endeavour and what I have spent most of my career striving for. I've learned a thing or two about that path along the way. This isn't the first time a choice like this has been made. I thought I'd share that this particular choice, if anything, undermines the goal.
- TheZenPsycho 13y ago"I thought I'd share that this particular choice, if anything, undermines the goal." but that isn't what you shared. All you had to share was vague old man gripes about a language, with the only concrete example being something that is only really half true. For christ's sake, you suggested Java and Objective-C for the task. How do you expect to have any credibility after that? For a novice language, why are you expecting a typical task would be decoding a binary protocol? To claim that you are just sharing your wisdom here is intellectually dishonest.
- 13y ago
- zxcdw 13y agoStep 1. Write in C++. Step 2. Compile with emscripten. Step 3. Run your C++ program on the machine. Happy?
- cbsmith 13y agoExcept I'm not sure how well that would work since it would then be compiled down to Lua... And of course, C++ isn't exactly a great choice for making hardware programming more accessible. I hear tell that's how a lot of it is done already. ;-)
- p0nce 13y ago> Javascript only has so much room for the bad to hide in--it's a little quirky, but isn't half as open to WTFs as, say, C++ (any generation thereof). No. Don't compare the unalduterated failure that Javascript is to the sound reasons behind C++ messiness.
- angersock 13y ago"sound reasons behind C++ messiness" The road to Hell is paved with good intentions. C++ isn't merely messy--it's a bloated festering gibbering idiot swimming in a fetid pool of infectious waste, the true depth and horror of which is hidden beneath a tapestry of warts and scabs. For the unwary, it seems sound enough, and then a few steps and templates later and the whole rotten structure has given way beneath their feet, plunging them in over their head in offal. Again, Javascript is a relatively tiny language compared to C++.