5 ms·
Office 365 is being completely rewritten JavaScript
- megaman22 8y agoExcept they actually use Typescript for all those things, no?
- thelarkinn 8y agoFor sure! That's our preferred way of using JavaScript. TypeScript in the end is just a static type linter that compiles to JS. Heck you can even "use" TypeScript's typechecker without even using a .ts file. We do this for the webpack project using JSDOC Annotations (Project: https://github.com/webpack/webpack https://github.com/webpack/webpack, Example: https://github.com/webpack/webpack/blob/master/lib/ChunkTemplate.js https://github.com/webpack/webpack/blob/master/lib/ChunkTemp...) because we didn't want a build step.
- dvfjsdhgfv 8y ago> It's one codebase and it compiles to: Web Android IOS MacOS UWP WIN32 (only one that uses electron) So unless I decide to switch to Windows 10, I will have to use the Electron version of Microsoft Office? I don't have many issues with JS itself, but frankly, looking what you did to Skype, I'm afraid of the final result.
- thelarkinn 8y agoThose are product decisions someone like me can't actually confirm right? I just know that the purpose or the goal is having a single code base, single toolchain, many targets. I just know I've heard of all of those targets being experimented with! A bit early to assume anything, especially from lowly me!
- donquichotte 8y agoIf you cannot provide actual information, why would you start rumors and make vague claims? Why is somebody "lowly like you" doing PR and insulting people [1] on hacker news? [1] https://news.ycombinator.com/item?id=17302135 https://news.ycombinator.com/item?id=17302135
- thelarkinn 8y agoSorry I offended. These aren't rumors just things we've been blogging about, etc. and I'll own being unclear. The Electron and UWP bits are things we've tossed around internally. I don't want to give more details because then it's more then I really know, which is unfair to the teams really working on it, etc.
- _pmf_ 8y agoThen please state it how it is: without Typescript, JS would be unusable for projects of this scope.
- thelarkinn 8y ago> JS would be unusable for projects of this scope Blanket statements don't really make great arguments. That aside, in my experience (webpack for one), projects at scale with JavaScript, are harder to maintain without some type safety and are a bit more bug prone and slower to refactor. But at the end of the day, its still compiled to JavaScript, whether you chose to slap a .ts file in there, or just use the typechecker standalone is a mere implementation detail.
- megaman22 8y agoThat's using JS as a compilation target, through. Increasingly, it's very rare to actually write JS - even when one writes JS, one is mostly running it through Babel or some other com(trans)piler, so that one can use a nicer dialect. I can write .NET IL assembly. But I prefer to write C# and use csc.exe to output that IL.
- raverbashing 8y agoYeah, the original "starting with scripting languages is wrong" is just cheap pedantry.
- thelarkinn 8y agoYup, and that really was what the tweet was trying to portrait. JavaScript, and many scripting (or maybe author meant interpreted languages), are incredible languages to start with. I have a love for the "sharper" langs like Rust, and AssemblyScript, however the ease of use, hyper backwards compatible, super super accessible package manager, and OSS Ecosystem for JavaScript are what make it world-eating. Plus its only 7-11% slower then C++ execution (last I checked).
- LandR 8y agoBut accurate? When I was at uni my degree course was basically Year 1: C Year 2 and on: C++ Year 3 and 4: We touched on java and javascript (although JS wasn't taken seriously, rightly IMO regardless of where dev is now). The degree had courses on things like writing interpreters, compiler theory and you actually had to understand how it all worked. I look at that same curriculm today and the starting development course is javascript (and also Java in year 1). All the stuff that I would have said was fundamental for any developer to know seems to have been dropped entirely. I don't believe you can start with Javascript as your first introduction to programming and become a good programmer. I see this in devs nowadays a lot that they work at a higher level of abstraction than we had to and yes they are productive. Take those abstractions away though and they are completely lost because they lack the fundamental knowledge that those abstractions were insulating them from. I've seen devs that graduated relatively recently (last 5 years) not understand the difference (and therefore the implications) of value types versus reference types. Not understanding immutability. I could go on and on.
- JustSomeNobody 8y agoI think students who know they don't want to do mostly web dev need to avoid computer science and go for a computer engineering degree instead. They'll get the engineering depth they need there. I was able to get my BsCpE with a SE concentration and avoid some of the EE classes because I knew I wanted to do mostly software anyway.
- matthberg 8y agoPreviously posted, original discussion here: https://news.ycombinator.com/item?id=17300893 https://news.ycombinator.com/item?id=17300893
- pedrow 8y agoI am finding it a bit hard to follow the Twitter thread, so for the sake of avoiding confusion - does this mean that the version of Word running on my Windows 10 laptop will soon be written in JavaScript?
- thelarkinn 8y agoCould be! Didn't we just announce (and got meme'd to death by InfoSec world) that Excel is going to be able to _run_ JavaScript. BTW this isn't breaking news, we have been talking about our love, bets, and use of ReactNative and ReactNativeWindows for a while now!
- iliaznk 8y agoThe high level source code – yes. But in the end almost everything (except one app implemented as an electron app) will be compiled to native code. They're using multiple forks of react native for various platforms – that's what he basically means by "written in JS".
- ptx 8y agoAre they actually compiling JavaScript (or TypeScript) ahead of time to native code? I was under the impression that AOT compilation wouldn't work well for JS because of its dynamism, hence the JIT compilers in all the web browsers. Or are they merely compiling TypeScript to JavaScript and minifying/bundling/etc. the source code, the way React Native normally works?
- iliaznk 8y agoIt's actually a bit confusing, in that thread he says everything is compiled to native, though...
- dullgiulio 8y agoI have a strong issue with the whole taxonomy. How do we decide what is a scripting language and what is not? What are other languages, enterprise languages? The same goes for "systems languages" and to all those making a flag of these definitions. They are meaningless. In keeping with the UNIX philosophy, everything under /bin is a system software, no matter what language it is written in.
- fermigier 8y ago"How do we decide what is a scripting language and what is not?" -> John K Ousterhout decided in 1997 (because, IFAIK, he invented the term). It was quite brilliant at the time, IMHO. Now, 20 years, later, I consider his dichotomy outdated on several levels. I did a talk about this 7 years ago ( https://fr.slideshare.net/sfermigier/four-python-pains https://fr.slideshare.net/sfermigier/four-python-pains ).
- rcfox 8y ago> How do we decide what is a scripting language and what is not? I'd say a "scripting language" is one that was designed to run "scripts". Where a "script" is a set of instructions executed against an API provided by a containing program, like your CAD software, to automate things. Javascript was created to automate the browser DOM API.
- FLUX-YOU 8y agoJust about everything uses an API to the CPU/OS/GPU. We're really just drawing lines in the sand and placing goalposts. Sometimes it shifts back and forth. Honestly the distinction is pretty useless as far as reading/writing production code goes. What really changes in your development mindset between compiled vs. scripting languages? You still want to write working, maintainable, and performing code in both. It's a useful distinction when teaching programming to show the different ways things boil down to primitive instructions.
- dullgiulio 8y agoCareful that you are conflating scripting and interpreted. Mostly we think of scripting as "interpreted and dynamically typed", but it's just an habit with no base. Notice that interpreted and dynamically typed are two independent properties.
- deleted 8y ago[deleted]