6 ms·
That's not fair. I'd rather use COBOL than JavaScript.
by Longhanks 10y ago
That's not fair. I'd rather use COBOL than JavaScript.
- anonymousguy 10y agoAs a JavaScript developer I feel the same way about Java... Unfortunately JavaScript developers are fully aware they aren't Java developers, but many Java developers don't seem to share this same realization.
- PeCaN 10y agoIt's okay, JavaScript is the new Java, complete with abuse of “patterns” and everything.
- qwertyuiop924 10y agoWhy the JS hate? sure, === is annoying, and prototypes confuse some people, but there's plenty good about it, and it's sure as hell better than COBOL.
- ktRolster 10y agoand it's sure as hell better than COBOL. Why don't you like COBOL? Serious question.
- qwertyuiop924 10y agoshrugs Modern COBOL, or Ancient COBOL? Most people mean ancient COBOL, which is what I was talking about. I've heard modern COBOL is quite nice.
- anon_d 10y agoWhat don't you like about Ancient COBOL?
- Koshkin 10y agoNothing, really. COBOL is the way it is by design. It is not something that its creators should be expected to regret to have done this way and not the other. The language was designed to serve a specific purpose, and it has served well. Look at SQL (which originally stood for "Structured-English Query language"). It shares some important features with COBOL (being "structured English", having easy-to-understand semantics), and, of course, just like COBOL, it often meets some harsh criticisms. I think that bringing both languages together (and I am not talking about Embedded SQL here) could result in a kind of "happy marriage" - in that one would get a pretty powerful tool for doing stuff on a computer without having to learn complex control and data structures - let alone things like macros, generics, iterators and such. I have met people who struggled with Visual Basic and who would certainly struggle with such languages as Python, but who have enough intuition and logical abilities to make it possible for their untrained intelligence to successfully create useful programs in COLBOL and SQL - not unlike non-programmers showing the ability to use, say, Microsoft Excel, very skillfully and efficiently (which, I must say, not every programmer can do; incidentally, I have also met professional programmers who struggled with programming subjects I'd thought were easy to understand!).
- qwertyuiop924 10y agoPrimarily, the irritating verbosity, which still exists in modern cobol. In addition, it has many frustrating features and misfeatures, which may have made sense at the time, but definitely don't now. Modern COBOL has much of the same, but at least there are alternatives to many of the more awkward bits.
- kazinator 10y agoAlan Perlis epigram #41.
- deleted 10y ago[deleted]
- int_19h 10y agoPlenty of reasons. For example, weird scoping of variables, that pretends that things are block-scoped syntactically, but they are actually not - and this is something that's extremely easy to step into with closures (which people tout as one of those great JS things). Or the whole "this" thing, again, conflicting with closures. ES6 is a significant improvement for sure, but we aren't there yet. In the meantime, a better question to ask, I think, is why all the JS love? What does it actually offer as a language, that others do not? The only thing that is universally acknowledged is that it's your only choice when targeting the browser, but that's not exactly a ringing endorsement. What other aspects are desirable? (And please don't say "closures". Even C++ and Java have them these days, so it's not really an achievement - more of a baseline.)
- qwertyuiop924 10y agoWhat do I love about JS? Oh, jeez... -idiomatic higher-order functions -relatively small (at least, until ES6) -"this" (I kind of have a love/hate relationship with it, really) -very little odd about the syntax (for a C-like language, everything is pretty much what you expect it to be, save some of the OO stuff, and the obvious elephant in the room that is ==). -prototypical inheritance -really easy serialization -builtin regex support -first-class functions that are equivalent to lambdas (you'd be surprised how many languages don't have this: It's pretty much just JS in the mainstream language space, AFAIK) -A vibrant community, that, while not always exactly on target, is always doing somthing new and interesting, and constantly iterating on ideas. -As of ES7, TCO. Don't get me wrong, there's plenty wrong with JS: I'd say more than is wrong with Python, and less than is wrong with Perl, and there are some quite nasty pitfalls, but it's not a horrible language by any stretch, and certainly not deserving of its reputation as a hacky, bastardized byproduct of Brendan Eich's sleep-deprived brain. Now if you want to see a REALLY stomach-churning scripting language, have a look at QuakeC. Carmack, I stand in awe of your brilliance, and I understand the necessity of hyper-optimization at the time, but are you sure you didn't contact some horrifying elder god to write this for you?
- int_19h 10y ago>> idiomatic higher-order functions Mmm... I wouldn't really say that JS is a good example of idiomatic HOF - just look at the standard library. I would say that JS has specific idiomatic patterns (such as callbacks) that are a subset of HOF, but most JS code you see around is not like ML or Haskell with regard to HOF in general. >> very little odd about the syntax (for a C-like language, everything is pretty much what you expect it to be, save some of the OO stuff, and the obvious elephant in the room that is ==). And scoping. And magic semicolons. >> first-class functions that are equivalent to lambdas (you'd be surprised how many languages don't have this: It's pretty much just JS in the mainstream language space, AFAIK) Can you clarify? So far as I can see, all you need for lambdas are first-class functions (function-typed values), function literals, and closure semantics for the latter. Most mainstream languages offer that these days. C# would be a good example - what do you find limiting about its lambdas that JS does better? >> Now if you want to see a REALLY stomach-churning scripting language, have a look at QuakeC. QuakeC was basically just C with only primitive data types (no pointers or arrays!), and a single reference type that referenced a single struct type with an extensible definition. So yeah, not very impressive; but it mostly did what it needed to do in its niche. Besides, it was fun fighting with the language limitations sometimes (e.g. you could simulate a global array by writing a function with a giant conditional inside - or, better yet, writing a code generator to do it for you). Again, not something you really want in a "production" language - but as far as writing game mods went, fun was usually the primary goal for most who did it.