8 ms·
Was Javascript really made in 10 days?
- Flux159 3y agoPrototyped in 10 days sounds more appropriate, then longer road to getting Javascript 1.0 publicly released. What I'm glad about is that they kept improving the language, especially after ES6 where ECMAScript proposals can be independently evaluated & validated for backwards compatibility.
- vlunkr 3y agoSome of the warts will likely never be fixed unfortunately. But I agree that overall it has become a much more pleasant language to use.
- 123sereusername 3y agoI heard a whole three weeks but that probably included coffee breaks. And to this day JavaScript remains the best language ever written in less than one month.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- rblatz 3y agoI had a professor that claimed to have invented the name ECMAScript. He said that they were arguing about the name for this new standard and weren't moving forward so he proposed a name so awful that they'd have to come back later to change it, so the argument could be put on hold for the time being. Then they never came back to fix it.
- rany_ 3y ago"Nothing is more permanent than a temporary solution."
- kreetx 3y agoWho is the professor?
- ape4 3y agoObviously not a marketing professor
- breischl 3y agolol, I did that with an internal tool once. It actually worked in that case - the name was changed. Although the "so terrible it couldn't exist" name persisted in some dark corners for several years.
- tzs 3y agoA similar thing happened at a company I worked for in the '80s, a 68k based Unix workstation maker named Callan Data Systems, named after David Callan who was one of its founders. There were two other founders and they were all equal partners, so I asked one of them why Callan was the one it was named after. What happened was that they had been unable to agree on a name all throughout the early stages of starting the company. They got to the point where they really need to incorporate to continue, but still could not agree on a name. Tempers were rising and they decided to step away for a few days to calm down, and during that time two of them went out of town for a hunting trip. Callan stayed home. When the other two got back Callan told them that he'd incorporated with a temporary name, which they could change when they finally thought of a real name they liked. The other two were annoyed, but agreed that this was better than having everything be on hold because they could not incorporate. That temporary name was "Callan Data Systems" and they never did come up with a replacement, and stopped trying when it had been so long that changing the name would have been a pain.
- BoiledCabbage 3y ago> Originally this was supposed Scheme, but then Netscape signed a deal with Sun and agreed to make it more "Java-like". Yes I know it's cliche at this point to mention it. And yes it could've had some unknown negative butterfly effect type of thing, but man I really would have loved to have seen where things would be now if Sun hadn't influenced this.
- methyl 3y agoOf course it’s nice to think what if JS would be LISPy, but I think most probably it wouldn’t be adopted so widely as it is now.
- satvikpendem 3y agoPeople use JS over other languages because they have no choice (transpile to JS languages are relatively rare, and TypeScript only succeeded because it's a superset of JS), I'd imagine Scheme would be treated the same way.
- methyl 3y agoLanguages with Java-like syntaxt are much more popular than LISPs in general even not taking JS into account. I think it’s just more intuitive to parse it in human brain, at least to me.
- packetlost 3y agoWhat is most intuitive to you is what you're used to. There's a lot of people that find Lisps syntax intuitive, and becoming familiar with it is mostly just part of the process of using it. All programming languages look foreign to the untrained eye.
- everforward 3y agoLanguages with Java-like syntax are taught in schools, and Lisp typically isn't. I've written some Lisp and I don't find the syntax hard to read, so much as my unfamiliarity with the language itself (what does cons do? What kind of args does it take?). Plus the occasional cluster migraine when I decide to write a macro, knowing that I'm lucky when regular code runs right the first time. Not really a fault of Lisp, I'm sure me trying to write C++ templates would end about the same.
- kokanee 3y agoOne of the biggest warts is the difference between the == and === operators. Eich attempted to alter the behavior of == in order to fix it, but was not allowed to ship the change for fear of backwards incompatibility, forcing him to add a new operator instead. To this day, recommended linter settings disallow use of the == operator entirely.
- deleted 3y ago[deleted]
- jancsika 3y agoCould "use strict;" have silently changed all occurrences of "==" to "==="?
- wk_end 3y ago`==` and `!=` are still quite handy when you don't want to deal with the distinction between `null` and `undefined`, which is almost always what you want.
- kokanee 3y agoIf you do this, you need to think through all the possible types for the comparators and how type coercion will affect the expression. For example, `0 == ''`, `[] == ''`, and `[] != []` are all `true`. If you're using typescript to get guarantees about the input types, maybe that's a good use case for using type coercion intentionally.
- T_cs 3y agoAs a junior JS dev curious to learn more, can someone give me a starting point into the “warts”? What are they, why are they considered bad, how do other languages solve these problems?
- soperj 3y agoGlobal variables to start.
- dsego 3y agoAnd hoisting with var, of course those are not relevant to modern JS any more. One other thing was the "this" binding in callbacks and events, if anyone still remembers doing var self = this; , luckily we have arrow functions now and class syntax for methods.
- chpatrick 3y agohttps://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- pzmarzly 3y agoSome notable ones: - No control over integer type. Everything is a double, except that it sometimes behaves like int for bitwie operation. You lose precision easily and silently. BigNum support is ugly. - Standard library is one of the worst among all languages, it's inconsistent and missing many basic functions. - Implicit type casting means you are better off always using === and never relying on truthiness (ie. in "if (...)" better make sure this ... evaluates to true or false, not {}, null, etc, or else you will be surprised by 0). - We have both exceptions and 2 special marker types (null, undefined). Different libraries will use different methods to signify errors. See Rust for how to do this well. - Prototype based inheritance sometimes leaks as an abstraction. The only languages I know of that use prototypes are JS and Lua.
- masklinn 3y ago> We have both exceptions and 2 special marker types (null, undefined). Different libraries will use different methods to signify errors. See Rust for how to do this well. This is in part because JS’s exceptions support is the worst: catch clauses can’t be filtered by type so you have to catch/filter/rethrow, and before ES6 subtyping Error was essentially impossible. So even if you are fine with exceptions, you don’t want to use them in JS. Even more so before async proper as they obviously did not work correctly through callback chains.
- patrickmay 3y agoEvery time I hear this story I become depressed that we could have had Scheme as the lingua franca of the web. Life would be so much better.
- ramesh31 3y agoI've always taken this the same as "Linus wrote Linux over a few weeks as a hobby during university". Yeah, sure, the kernel was functional. But just about everything we think of as Linux came later from thousands of contributors.
- wmf 3y agoIn particular, the DOM came years later. Early JS just had document.write() which was not very powerful by today's standards.
- gapchuboy 3y agoWhat was Bill gates bitching about JS? Did he plan to push VB script instead?
- peeters 3y ago> Bill Gates was bitching about us changing JS all the time Emphasis mine
- goto11 3y agoNetscape had market dominance at the time so Internet Explorer had to keep bug-for-bug compatibility with Netscape to keep up. Given the amount of bugs and the lack of documentation of JS, this must have been quite frustrating for MS who was used to calling the shots.
- masswerk 3y agoMS had licensed JavaScript – and, of course, their implementation was incompatible (at least in certain parts).