Office 365 is being completely rewritten in JavaScript
twitter.com
twitter.com
Depending on how you are authenticating you will see URLs with various words in them.
loginlive office.com outlook.office.com office365 outlook.com account.live products.office.com login.microsoftonline.com
and this list goes on and on... I am wondering if they made an announcement that they are fixing their messy authentication workflow instead spending resources in rewriting office in JavaScript, that would have gotten this much attention on hacker news.
I'm usually pretty savvy about typing information into a rando web form, but with windows logins it's a major chore to figure out what exactly I'm looking at.
I hope they staff up to meet the 18-month rewrite cycle for modern JS apps. I'll stick with my 2003 version on the desktop for now.
Disclosure: Microsoft employee, but not on Groove (or anything related to appx packages for that matter)
I work on a codebase that still carries product names that stopped being meaningful almost a decade ago. No value in renaming across the codebase and it’d be expensive because of how much code has to be touched.
Source: former dev on the team.
For Google, see the very many failings here: https://grumpy.website/post/0PU1U2r3v. Someone (me?) should do the same for MS.
It adds types and constraints that have no effect on the resulting transpiled code besides an insurance that said type constraints are being met.
To better illustrate what I mean, in the start of a Unix script you sometimes have them augmented with #!interpreter. But this extra contextual information is not a superset of the scripting language itself. Likewise Typescript is also an augmentation that lives within the code that provides contextual information to the Typescript transpiler itself, but does not necessarily effect the actuall produced JavaScript.
By this kind of logic, C++ === machine code. It compiles down to it, right?
Please tell me that VBA will finally die.
Is it money, fear or gatekeeping that keeps these VBA programs untouchable?
Having worked at a big company as a mechanical engineer and produced a few crappy VBA apps, I did it because it would take significantly more time and effort to get approval for an IT project, than to learn VBA and do it myself.
I used to be in the Medical Devices field. A couple years ago, I was told to add a feature to a massive VBA app hosted in Excel that we (S/W development) inherited from another department. It was hands down the worst code I have ever seen. Everything was a global variable. I flat out told my boss that it barely worked, didn't come close to meeting the weakest of our development standards, and since it was used to disposition product (determine whether or not it was acceptable to be used on Patients) it was an FDA audit nightmare waiting to happen. I added the features, but made some pretty unpleasant commit comments since I didn't want to have my fingerprints all over it.
In all fairness, it was originally developed by a scientist with no SW dev training (I knew him well) for his own use, and just grew over the years as he was told to add more features to it. I have no idea how a company with that level of process strictness ever allowed this fiasco to happen.
[rant over]
I estimated the rewrite at 6-12 months. It was really not a very complex program and since we already had the Validation tests written and documented, we at least knew what tests its replacement would need to pass. The problem was all the stuff that we knew it was doing that wasn't in any of the tests. That would have been the majority of time spent to replace it.
Since I left, I heard ownership of it was transferred to Corporate IT and they were making it into a web app to run on their intranet. Heaven help those guys.
At my last job, I developed automated processes. Some software companies sell tools to automate clicks and keypresses. The idea is then to reuse that Excel macro no one understands inside a VM on a server, and adding a friendly webservice on top of it. Users of the web services don't know an actual screen is running and and an Excel file is being clicked for them.
I was involved in work with a regional financial institution. They had a suite of line-of-business apps written in Access and VBA.[0] This was in a pure support and maintenance mode. This series of apps was written over the course of a decade by one developer nee business user. It represented a literal Great Wall of Chesterton.[1] There was so much process and institutional knowledge tied into this suite and the original developer left after being absorbed into the IT organization.
Some fun observations from work that was done on this suite of applications:
- "We can tell where the original developer learned various programming techniques and when something was written based on that."
- There was a source control and deployment app written entirely in Access DBs and VBA
- There were two scheduling applications, one designed to replace the other, but the first never fully retired. These launched jobs based on dependencies and timings.
- The applications ran in Access 2010. No upgrade was possible due to observed breakages when attempting to change.
- A Windows security update caused an outage for a day.
- Some data was centralized into a SQL Server instance and Access was a thin app layer on these tables. Others held data in the Access database.
- Different apps could reach into and run arbitrary queries on data of other apps. This was sort of RPC. Huge spooky action at a distance.
- There is a ticking time bomb based on Access database size limits. They run compaction jobs on a regular basis, with increasing frequency. One of the core apps will simply stop working one day in the not so distant future when its database cannot be compacted to be smaller than the Jet engine limit of 2GB.
I mentioned that this thing was in perennial support and maintenance mode. There were several assessments over the years for a migration to .Net. All were eventually scuttled due to cost and fear of functionality shifts. No one knew if what was there was correct, and some of the bugs we fixed demonstrated that there was plenty that was incorrect, though scope and impact were difficult to measure. No one wanted to own a migration due to the likely fallout. Different would be wrong, even in the face of huge evidence to the contrary. A C-suite executive was ousted largely over this suite of applications. The Access lives on.
Eventually a migration, in part or whole, will be necessary. It will be expensive. It will be painful. Each day increases the expense and pain. But every day, it is cheaper and easier to run and maintain.
[0] This thing hit commercial and customer facing processes, internal things like HR, letter generation, asset management, and basic reporting, among other things.
[1] See: https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence
Note: Throwaway because of the level of detail
And by the next "best" thing, I actually mean the next worst thing, because I've written apps that interop with VBA macros and no man or woman should ever suffer such an experience.
What did he write that you did not?
Talking about the online versions of office, it is a mess. For Word and PPT they tried to replicate the desktop to the web, rewriting the code, so their current online versions are already using (mostly) new code dedicated for the web. Saying that, they also have a huge number of legacy components and features that they need to support for backward compatibility.So for word and ppt this is a mix in code, not a total re-write. They also have a substantial subset of the features that appear only in their older desktop brothers. Even the PMs don't dare to dream on features parity between the versions.
Excel is a different world and a big-big elephant that won't likely be rewritten any years soon. Think of a code that is maintained over 30 years. Literally, developers are still maintaining code written in the 90s. Trying to bring Excel to the online world made MS create an architecture of html frontend which communicates with a dll session behind the scenes. As weird as it sounds, this dll lives as long as the browser has the spreadsheet opened. Think of it as MS raising VM for every excel file that is opened over the internet. While this is not very cost effective (saying the least) and not very performance friendly (hey ma! I made an understatement) this allowed them to move forward with Excel online very quickly by having a UI communicating with the bloatware dll that runs on the background in Azure. Summarizing Excel, it probably won't also be rewritten in js.
So this PM might be talking about the new apps - Teams or flow or something similar. Not the office cash cows. Personally I really hope he is talking about Skype which became a total garbage in the past versions.
Anyone from Google here? I'm looking for a job :-) ping me (chengmau) in the blind app
It's pretty much exactly the scenario of my nightmares.
Maybe, or maybe it would open up an opportunity for more competition. Who knows? Maybe the year of the Linux desktop is still coming :)
Not in terms of code bloat/complexity (these exist in both, as you've just described), but in terms of engine size, drive-ability, edge-case handling, etc.
It's probably a hard question to answer; it's (for some reason) hard for me to articulate exactly what I mean too.
And regarding Excel-literally-in-the-cloud... is that why Microsoft needed to make Azure? :P
I think that the C# focus of .NET is a major mistake holding the platform back, especially when we have languages like F#, Scala, Swift, ReasonML and Rust these days.
> I think that the C# focus of .NET is a major mistake holding the platform back, especially when we have languages like F#, Scala, Swift, ReasonML and Rust these days.
Yeah F# is really nice, but the IDE support is kinda meh. Also .Net expects you to embrace nil at a lot of points which doesn't gel so nice with F#. But Swift has a worse problem with Objective-C-isms but being a first class citizen really helps as they make a lot of API's really better to use with Swift.
My boss told me there was no future banging out C on small embedded processors. 25 years later there is always work because there are so few people who can still do it. When 80% of programmers can't do anything other than JavaScript they'll be more than plenty of work for the other 20%
Also see https://www.thurrott.com/cloud/office-365/161295/microsoft-r...
See my comments here:
* https://www.reddit.com/r/programming/comments/8qqhlz/office_...
* https://www.reddit.com/r/programming/comments/8qqhlz/office_...
Also, they're actually using Typescript.
I bet this is only the new stuff like Delve and the less functional, more social apps/components. I can't imagine how they could pull this off for a full version of Excel or even Word or PP..
Besides, office currently isn’t written. In .net, they would be migrating away from C++ code.
Also, I expect the existing code base isn’t small, so a rewrite won’t be ready soon.
That makes cross-compiling from whatever they have now to WebAssembly or JavaScript seem even better options.
Considering they are uniquely positioned to make it happen given their C# buy-in and probably more than just a bit of existing software to leverage, I'd say this is as strong a signal of non-endorsement as it gets.
I assume that they have. Typescript compiles down to Javascript so the tweet is technically correct (written in TS, executed in JS) and there are many out there who won't have a clue what TS is but have at least some grasp of what JS is so JS was probably stated instead of TS to avoid confusion amongst the unwashed masses.
Yes, in theory you _can_ write big projects well in dynamically typed languages, but in practice you get a mess of undocumented interfaces and unit tests that don't quite catch the plethora of errors not present when a static type system is in place.
I think Typescript is a great middle ground between the loose running JS hipsters and the Haskell loving Hindley-Milner type system CS researchers. You can enforce the type restraints that you want (I personally am strict about explicit "string | null" declarations) but you're still hip enough to draw the JS talent.
edit, since there seems to be some confusion: I am explicitly talking about the WIN32 variant, which he confirmed to be based on Electron.
"No they are not electron apps. They are compiled to native code.
It's now finally one toolchain(#webpack)
It's one codebase and it compiles to:
Web
Android
IOS
MacOS
UWP
WIN32 (only one that uses electron)
7:52 AM · Jun 13, 2018"
https://mobile.twitter.com/TheLarkInn/status/100676113439583...It's kind of sad; all the good stuff I use is basically legacy Windows. None of what Microsoft has done since Windows 7 has appealed to me.
I too find it hard to believe they would drop the native Windows and OSX versions of Outlook, Word, Excel, for apps written in React Native. But Microsoft has offered many surprises lately...
https://mobile.twitter.com/TheLarkInn/status/100677077815354...
> WIN32 (only one that uses electron)
which happens to be the version most people use.
What's that? Win32 a second class citizen? Never!
It was a very smart move of MS to kill newer chipsets :-(
If they hadn't done that, win10 would have completely tanked
So, what the hell was this guy tweeting about?
Whoever makes the first neural model capable of returning interesting insights after being installed in the telephone switchboard/backbone is going to have a most unique life.
Edit: Just realized ISPs have probably been trying to do this for years. I'm talking about the first individual. It'll probably happen routinely in 20 years or so.
The challenge here is social. The Web has fist-mover advantage. Also, I fear that doing it the right way would be equivalent to forcing standardization on a single operating system (or a family of systems).
In the best case scenario you implement something almost identical to the current web which is only slightly better, and therefore not worth moving the entire world over to your stack just to get these minor improvements.
You will have built a beautiful language/Web for today's needs, 10 years too late. And as the needs mutate you'll try to mutate with it, and that's how we get JavaScript.
Typo reveals essential truth.
The Second day Microsoft decide to buy GitHub and everyone were flocking off to Gitlab, everyone hates them.
Now they are moving to the biblical end of computing era by making every Javascript.
May be they will even Open Source the Windows Kernel some day.
Only after they have rewritten it in JavaScript.
https://mobile.twitter.com/jdgarciauc3m/status/1005768121230...
> Tip of the day.
> Scripting languages as first programming language for CS bachelors are WRONG. You are not able to write an OS, a DBMS, or even an Office suite with an scripting language.
I honestly thought this was a satire tweet. I guess I just don't associate even a CS bachelor's degree with writing that kind of software. I mean, it can, but there are more theoretical tracks that don't involve writing a OS/DBMS.
Not exactly OS/DBMS but still pretty low-level.
However, I find the opinion to be correct: Scripting languages might not be a good first programming language for a CS bachelor, where priority is deep learning of programming. I'd also argue that JavaScript would be a bad candidate, as it is a very "unclean" language, being a poor way to teach language/compiler theory.
As a first practical programming language for a non-CS bachelor, scripting languages are fine. Without CS courses to support you, other approaches might be too difficult, while scripting languages often let you get (terrible) programs up and running (ish) while ignoring basically all CS aspects during the learning phase (only while you're not making anything big, though—the "high level" illusion breaks down fast as things grow).
(Also, yes, you can write a DBMS or an Office suite in a scripting language. I can't possibly comprehend why you'd want to do something like that, but it's very much possible. Bringing OS's into things is cheating, as most compiled languages can't be used there either, and those that work often only work with a subset of the full language.)
The priority is deep learning of computer science, not of programming.
I think JavaScript is a fine language for teaching a lot of CS basics. For example you could run a course based on SICP using JavaScript instead of Scheme, I believe.
One of the nice things about so-called scripting languages is the breadth of library support. If you want to put together a GUI that displays some word-wrapped text, you can do that within the first hour of using the language, if you have some homework instructions you're following. At that point you can think about the interesting parts of writing a word processor, and not just how to put a window on screen (which tends to be more about docs and APIs and not about actual computer science). Also, importantly, at that point you've successfully done something, which is pretty important for the learning process.
Very efficient, though technically MS acquihired Mark Russinovich.
He still works on them even though he's Azure CTO.
VS Code, Discord, Slack, etc., all have awful performance on older hardware where native programs like the full Visual Studio fly.
It's my personal suspicion that people cheerleading JS all are working with fantastic developer hardware, where the performance impact is pretty muted.
But if an app does it "old school" then it can definitely be very slow.
My full-time job is writing tools in React that often have to handle datasets in the >10k items range.
I work on a React project that has a faster UI than its native desktop counterpart.
Let me illustrate the DOM question with an example.
Let's say you've got an "old style" jQuery to-do app. The user types something into the field, and clicks "Add".
- The input field will be cleared
- A new element will be added to the list, containing the string
- The counts for "total items" and "items remaining" will be updated
Now let's say you rewrite this app in React. The user types something into the field, and clicks "Add".
- The input field will be cleared
- A new element will be added to the list, containing the string
- The counts for "total items" and "items remaining" will be updated
Your code that accomplishes this will look completely different - much more readable and less fragile - but the exact same DOM API calls will be made, and it will perform exactly the same.
The "speed" we associate with React is not in comparison to "old school" libraries, but to the naiive way of achieving data-driven syntax. You could just nuke the page entirely and re-render everything from scratch each time your data changes. This would be the easiest way of achieving data-driven syntax, but it would indeed be extremely slow. React gives you (something approaching) the performance of jQuery-style mutation, with the developer experience of reconstructing the DOM from scratch every time data changes.
Perhaps it's your computer and not Outlook.
[1] https://twitter.com/TheLarkInn/status/1006761134395834368
>> Those are one in the same thing (compiled) :-). But us TypeScript in majority at Microsoft in almost all the projects I've seen or been apart of.
Using the same logic, could we say that all windows is written in assembly ? When looking at JavaScript output of a Typescript program, it does really look like JavaScript is treated as assembly.
One almost never edits the JavaScript code when using Typescript, especially if the mapped ts files are available when debugging in F12.
(I have no idea how other formats are structured)
I know that it's common for rewrites to not approach feature parity, but I think Microsoft is aware of how much people rely on Excel and Word and will make feature parity a high priority because of that.
Meaning it's not the language the real issue , it's what you do with it.
Also Junior at school are less and less trained with Java and C# but straight up with JS or PHP , so it will be much easier to integrate juniors on this re-written version of office rather the pile of legacy C++ / COM / C# bridges mess they have right now.
Any new developers on this need to have experience working with email standards and a good knowledge of C++ / C not some fracking scripting language!
And as some one who used to do international interconnect I think I have some valid input here - this has shades of the amusing project spitfire fiasco in the late 80's.
None taken .
My point is Microsoft is shifting to make it easier to separate their apps into clear layers . Coders from bootcamps can deal with the UI and some logic , C++ Engineers will deal with back-end and the mess that office is, and expose some API in JavaScript for them.
Great, so the UIs will continue to get slower and more broken. What a glorious future we have to look forward to.
No they are not electron apps. They are compiled to native code.
It's now finally one toolchain(#webpack)
It's one codebase and it compiles to:
Web
Android
IOS
MacOS
UWP
WIN32 (only one that uses electron)> how is that even possible? there are tons of legacy features in there, COM/OLE APIs, SDKs, plugin architecture, macro system, VBA interpreter, VBA IDE, graphing components etc. Almost 30 years of development. No way MS is going to rewrite all of that. (Maybe the "mobile" version)
I think this is a strong indication that all these technologies are going away.
He's said it's not compiling the JavaScript to native code - it's running it in a normal JavaScript JIT. It's not 100% native code.
Also, I do not know what the Linux plans are (but hey maybe a great time to voice that special love you have for Linus T. and his masterpiece)!
JavaScript is a real language now. It's powerful and performant and uses modern paradigms, in addition to its sheer relevance.
That said, I am glad I was taught using C++ in college. Not because I plan to ever write an OS or DBMS, but because it taught me valuable lessons about pointers, how memory is managed, how arrays and lists differ, and other computing fundamentals that still inform you when writing in higher-level languages, even if you don't have to deal with those concepts directly.
But also - not to stereotype too hard - but low-level people often have that crusty-old-sailor syndrome where they've been doing things the hard way since before these youngun's even first saw code, and if they can manage their own memory for performance then god-dangit everyone else should have to too.
I've been required to teach people in the top-down manner that has left knowing gaps and rendered them without the tools necessary to solve their problems. That's not to say somebody who eagerly learns on one's own may be fine. Of course they might, so long as they have a way to determine what they need to learn. But most people don't eagerly learn on their own, and so a prescriptive "start at the bottom and build up" provides the necessary knowledge and grounding despite themselves.
>It is. But @typescriptlang is just a static type linter that compiles to JS.
Hell, any language is just an assembly runtime plus a grammar. TS is a language that happens to be compiled to Js, I bet in the future it will be wasm.
The Skype for Business Windows client was barely reskinned from the Lync 2013 client. I think they are still only a couple dozen patch revisions apart on the version number.
It would just be nice to be able to join Skype/Lync meetings with Screen sharing.
No they are not electron apps. They are compiled to native code.
It's now finally one toolchain(#webpack)
It's one codebase and it compiles to:
Web
Android
IOS
MacOS
UWP
WIN32 (only one that uses electron)
In other words it's not a "secondary" level, you only have to learn one level to use it.
Ah yes, you can see here the strong love of Linux in Microsoft.
Can somebody please design even worse language so that we can progress by reimplementing everything in it, keeping us occupied for the next 20 years?
For developers though, this is chargeable so I'm on the fence :)
What's wrong with JS, exactly, that isn't made up for by its advantages?
I see these 'kool-aid' / 'JS is cancer' comments all the time, but they don't come with any real details.
I feel like you've probably never really used JS, if I'm being honest.
I wrote bleeding-edge games and other crazy stuff in JS you might be using right now in your business, so my opinion is not unfounded.
On the web, and now suddenly on the desktop, velocity is not what we need. We need quality and consolidation. Down the line can you see any ES6 based API lasting as long as win32? Hell no. Why would I want to risk building a major capital product on such guarantees?
The language has some very ugly warts (although ES6+ fixes many things), I find that the quality/maturity/stability of third party libraries lags behind other languages, and the whole build/dev environment best practices is constantly in flux and breaking things all the time. Also Electron, for all it's advantages, is renowned for being a massive resource hog making what is otherwise a fairly fast and efficient language appear horribly slow at times.
That being said, developing in JS today is a lot better than 3-4 years ago, and I suspect that that pattern will continue.
JS's only unique, redeeming quality is its availability through the deployment of web browsers, and the benefits that come with such widespread use. JS wins marketshare because it has marketshare. Any language could have taken JS's place, and most would have been better. WebAssembly, when DOM integration and others become a thing, might allow us to throw JS off its throne.
JS doesn't have advantages on its own to make of for its disadvantages, and relies heavily on extremely advanced JITs to make it borderline acceptable. The language itself still has very clear signs of having been designed on the back of a used napkin (its number type, its "array of int16's" string, "this", "prototype", ...).
I would like to acknowledge that ES2016 brought some things that did remove some retarded areas of JS (like arrow functions, which do not have its own "this" context, unlike the old function expression, class definitions that can briefly make you forget the terrible underlying "prototype" madness, and ways to access proper unicode code points in strings), but we are very far away from having actual advantages here.
From a technical perspective, there are couple disadvantages in the long run that can make large codebases unmaintainable. In particular JS and PHP are resistant to static code analysis since they support functions like exec. So it becomes difficult to deprecate functions because the references are not necessarily explicit, thus can lead to tech debt buildup. ES6 does a better job but its backwards compatibility can leave the code vulnerable.
I think the prestige comment is a bit unfair, but today at work I had to educate a JS dev on what headers are in a HTTP request/request and some other pretty basic things (a dictionary/record type object and a JSON string are not the same thing for one). They were like "I know I've got to do these things, but I don't know why/how they work".
So yeah, I don't think disliking it because that's the average quality of JS dev I see is an unreasonable position. I'm sure there's some great ones out there doing impressive things, but I'm sure you could point them towards nearly any language and they'd produce something equally cool.
I'd say they'd produce something massively cooler ;-)
Pretty sure we're up to billions of real world value created by software written in Javascript. If you're still dismissive at this point, it's time to catch up. You've missed the boat.
And no, a JIT can't save you from this, it can only make things acceptable.
That it can create "real world value" is an extremely low bar, which is passed by any turing complete language. COBOL creates "real world value".
From everything I've seen, its performance sits just below Java (4x slower, perhaps) on some standard algorithms or tasks, and significantly faster than languages like Ruby, Python, etc.. I never see hate for those languages like for JS, so I'll disregard that.
>not terribly good
This one never has made sense. What is it missing that makes you hate it so? I think it has rather robust asynchronous handling, 'everything is an object' has lots of nice implications when paired with functionality like Object.keys / .assign, ... So what are the issues you see that make it 'bad'?
"4x" is a lot slower, and a lot of things are much worse than this. You have to have deep knowledge of the VM (such as knowing how "hidden classes" work in V8) to be able to get JS close to Java.
> so I'll disregard that.
You shouldn't. Claiming a JIT'ed language is fast due to being faster than Python, an entirely interpreted language, is like saying a moped is a fast vehicle because it's faster than biking. Apples and oranges.
Being faster than PyPy, the JIT'ed Python implementation, is a more interesting thing, but this is still very far off "fast" languages.
> What is it missing that makes you hate it so?
Most language features, really. "Everything is an object and objects are hashmaps, EVEN ARRAYS" (terrible for performance, type safety), "array of int16" strings with totally broken unicode codepoint handling (ES2016 brought new ways to deal with codepoints, but the standard way is still broken), the "Number" type which is totally retarted, the terrible "prototype" system, the malice that is "this" and how any bare function expression had its own this context (arrow functions are a good workaround now), and god I could go on.
"Everything is an object" is only useful if you either actually need a hashmap (then use one!), or you have sloppy types.
JS, as a langauge, is not well designed. I'm not saying it had to be Haskell or Rust, but JS is far below average.
It works, and does it job decently due to the very hard work of JS engine implementors trying to make this crazy thing fast, but that's not the same as being good.
But you still have to compute hashcode yourself :D
Name a few.
>terrible "prototype" system
>malice that is "this"
It sounds like you are talking about ES5, not ES6+
He did, literally exactly after that sentence.
That's a solid argument for only programming in C and Assembly because they are often 4x faster than anything.
> Most language features, really.
AKA, your preferences are "language features".
> Everything is an object
So you don't like Python. Or Ruby.
> the "Number" type which is totally retarted
Very technical argument there.
> the terrible "prototype" system
So you prefer classical inheritance. Cool. Doesn't mean prototypal inheritance is a bad thing.
None of what you mentioned are missing features, they are personal preferences stemming for your own language preference that differs dramatically from Javascript. I'd start by disassociating your opinionated stances from actual weaknesses in the language, of which there are many, and none of them are what you mentioned.
Nope. No it does not.
JavaScript is particularly egregious because of it's weird behaviour about types and coercion and you know, just silently failing, behaviour that I wouldn't want going on in any proper system that handles anything important. Other people have written at great length about JS's many failings.
JS is not the only language with nice async support, practically every mature language has async support and a good number of the compiled ones have proper parallel support as well.
sure wish i knew what you are talking about w/r/t "silently failing". JS has working exceptions just like 99% of widely used languages.
I'm very glad that you've been omniscient enough to determine what "proper" parallel support is, though. How's that working out for you? Meanwhile, those of us using JavaScript simply run one process per core and never worry about contention, deadlocks, or race conditions.
> x={}
> x.fred
undefined
Actively unhelpful!Do they now?
$ irb
irb(main):001:0> "0" + 1
TypeError: no implicit conversion of Fixnum into String
from (irb):1:in `+'
from (irb):1
from /usr/bin/irb:11:in `<main>'
irb(main):002:0> ^D
$ python
>>> "0" + 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
>>> ^D
$ node
> "0" + 1
'01'
> Meanwhile, those of us using JavaScript simply run one process per core and never worry about contention, deadlocks, or race conditions.If you never worry about those things, then you're either not sharing any resources at all (in which case threads are also dead easy), or you're failing to deal with the shared resources properly.
Oh, and JavaScript is single-threaded. It's impossible to share resources in a single process.
DBs, files, etc etc. in-process memory isn't the only resource you're sharing.
No, that's not true at all. Dynamic languages don't necessarily have type coercion at all, much less weird behavior around it (and, conversely, statically typed languages they have coercion may have weird behavior around it; there's just no link between dynamic typing and weird coercion behavior.)
Well, if someone has to do it, I will: not doing type coercion isn't weird, and doing inplicit type coercion (not strict promotion[0]) is both weird and dangerous.
But, in any cases that's not really the point. The point is that in this...
> Every dynamic language treats things slightly differently.
“dynamic” is irrelevant. Languages have a wide variety of approaches, doing promotion, coercion, neither, or both (though where both are done, it's often just called coercion even when it is promotion), and dynamic vs. static is mostly irrelevant.
[0] that is, where the “from" type has a range that is a subset of the range of the “to” type.so that there is never a change in meaning resulting from the conversion.
Yeah, and I can do the same thing in Python, and it will be equally as lame: both languages are fundamentally single-threaded.
You act as if JS has all problems solved: Erlang/Elixir/Golang have far superior async & parallel stories and will happily thrash JS/Node in performance and efficiency.
How’s it working out for me? Well I do a lot of stuff in Haskell and Rust now, so pretty great actually.
The reason so much has been spent on Javascript: it runs in the web browser. For sure, people have found other reasons to like Javascript but at the bottom of the pile, money was spent because it was in the browser and the browser vendors wanted the browser to do more.
1. Type Safety. TypeScript helps, but until strong typing is mandatory in the language, I can't fathom using JS in any sizable project. This is also true of Python, et al.
2. A sane dependency management framework. Maven solved this problem a decade ago. Gradle is trying to fix Maven's XML mistake. But the fact is, if I need a dependency in Java, I know how to get it. And as a bonus, Maven Central isn't going to go down next Tuesday because Timmy in Alberta threw a temper tantrum or something.
3. A sense of stability. Javascript's framework churn is just exhausting.
There are massive JS projects in production today, but that's moot. It's never going to be mandatory because that ruins the point. Typing isn't a requirement of a language.
> A sane dependency management framework. Maven solved this problem a decade ago.
A Rube Goldberg machine that solved a problem? Maven's goals may have solved the problem, but its implementation did not.
> A sense of stability. Javascript's framework churn is just exhausting.
Feature, not a bug.
There are quite a large number of counter-examples to show type safety isn't especially important to the success of large projects.
I think the guarantees it provides are far too limited and weak to support large software systems. It relies on static code analysis, which doesn't mean much unless your app is a single build and runs as a single instance. That's more of a '90's style Microsoft Word type of app than what a typical large software project is today. Meanwhile the guarantees it does provide are only helpful to the extent developers can map their domain problems to the capabilities of the type system. Sometimes there is a nice natural fit, but usually the typesystem is both too weak (doesn't provide a convenient and natural way to impose the constraits of your problem domain) and too strong (imposes constraints your don't need or want, encumbering your development process).
Not to mention that when it comes to Javascript, you can opt-in to about as much static code analysis, including type-safety, as you want.
The only other language that I have seen generating as much hostility is vb6, and also I believe because some developpers found themselves forced to use it.
After using something like Elixir, you'll even wish if Javascript could be permanently banned from the Software industry for ever.
I use Elixir + Ruby + Coffeescript and I still wish JS was never invented.
https://twitter.com/bendhalpern/status/578925947245633536?la...
I used to think the same thing back when I used Clojure + ClojureScript. Hah, what idiot would choose Javascript over my god tier Clojure/Script setup?
Well, one day I actually tried to build a company and my cofounder just couldn't be fucked to learn Clojure. We decided on Node. I was forced to learn how to play nice with Javascript where I learned how to appreciate it.
Nowadays, I have a hard time justifying something like Clojure/Script over Javascript. Same with Elixir. And I am very wary of people who can't spot trade-offs since that was how I used to be, and I was wrong. I just didn't have enough experience.
There is no best. There are only trade-offs. Elixir/Clojure might be a good business decision for your project, but if you can't concede any positives to Javascript, I don't think you have a firm grip. And in the end it's always a business decision, not a technical one.
"There are only two kinds of languages: the ones people complain about and the ones nobody uses."
- Bjarne Stroustrup
Luckily, filesystem designers worked hard at making their filesystems journaling, fault tolerant, and more. And we stopped complaining angrily about filesystems ruining weeks (or months) of work, because it stopped being a regular occurrence.
We still complain about the flaws of C++ because they are a constant source of pain.
Stroustrup is arguing that if something is popular criticisms against it must therefore be invalid. He's wrong.
No. Stroustrup uses his snarky retort to deflect criticism. When C++ is criticized by (academic) language designers, his comment reads as "and yet people use my language and not yours". And that's pretty immature.
Popular tools have to meet a high quality standard because every wart in the language affects millions of people.
Are you suggesting C or Haskell are without their problems? What is your definition of a "good" language?
Other languages have great ideas in them, but the languages themselves are a mixed bag. Perl, Java, C++. Perl inspired Ruby. Java inspired C#. But we haven't seen a good successor to C++ yet, probably because building a systems language is much more difficult than building an interpreted/scripting language.
Maybe D, but outside Facebook nobody really uses it.
The old Javascript were very bad, recent Javascripts were bad, today's Javascript are OK, future Javascript / TypeScript is actually pretty decent.
Of course I do hope something else has taken its place.
Existing projects were written in whatever language for whatever reasons, it's "Would I start a project in this language today?" that's the bar to beat in terms of language "quality" and, in that sense, COBOL is a fairly low bar for most domains.
Some extra hoops to jump above "delivering value (measured in revenue)" are:
- Not creating extra problems for yourself down the line (maintenance costs, complexity, technical debt).
- Not creating extra problems for everyone else (promotion of technologies causing problems if adopted).
- Not dumping externalities on other people (inefficient solutions causing worse UX, more frustration and extra electricity usage).
- Delivering actual value, as measured on the user end (whether or not the software makes them more productive), instead of revenue end (i.e. did we manage to trick enough people to pay us?).
There are pros and cons, but within the next few years it could become common to write in your language of choice, compile to WebAssembly, and ship an app that’s within roughly 50% of native speed.
I imagine JS will still be hugely popular even in that scenario, but that’s a different topic.
https://blog.bitsrc.io/11-javascript-utility-libraries-you-s...
It's too big for a TLDR;
But, just #1 in that list - You need to use a utility library to work with data types in a normalized form? In 2018?? Let that sink in. I hadn't had to do this with any other language.
There, I fixed that for you. I didn't miss the boat. I've had to maintain mountains of awful code written by careless programmers in a pathetic language with a morass of constantly changing libraries for run-times (web browsers) that can't even be counted on to interpret the code the same.
"There are only two kinds of languages: the ones people complain about and the ones nobody uses." - Bjarne Stroustrup
Every time someone waits for an Electron app to load, or watches it eat their ram? That gets added to the prejudice scale. Every overly-slow page load that eats mobile battery. The feeling that "it doesn't have to be this way" is very strong.
Maintainability is a problem regardless of language, scaling is moot as these run native code, scalability is an odd word choice given we are talking about desktop apps, and intrinsic conversion can be solved via TypeScript, Flow or any other typing framework. C, Java and C# all have their own set of downsides as well, but we don't pretend those aren't "real" languages.
You are correct that "it doesn't have to be this way" which is why native compilation exists and is continuing to grow.
Microsoft are using React Native here (aside from the Win32 build), which is going to be a lot more lightweight because it relies on the native platform for the heavy lifting.
Objections against javascript are not Luddite objections against all types of higher level abstractions; the complaint is that javascript is not suitable for the creation of complex high quality software. If you beat your head against the javascript walls long enough can get something to work eventually, but that's not much of an endorsement.
The only thing javascript has going for it is the delivery mechanism, and that is what makes it so compelling for business use. But this is not because javascript is so good, it's that the other methods of packaging/delivering software are so painful.
The total absence of high quality software written in javascript is sufficient evidence to conclude that javascript is not a tool suitable for serious application development.
a little overstatement, but okay. js is very suitable for this in my opinion. i don't what counts as "serious" application development in your world, but i've seen quite many good, performant applications around written in js. and servers too!
You've just never seen the monstrosity that is enterprise-level VBA.
Javascript is a godsend over VBA.
However, they've announced that they're EOLing the Office version, with bug fixes through 2020 and security updates through 2025, and are continuing forward with the UWP version.
Perhaps we will see a future where they EOL the other Office applications in favor of new versions that are more similar to the iOS/Android versions. The iPad versions of Excel and Word are already pretty good.
It does say users will be able to enable the full ribbon UI still, so I suppose I will have to do that. Hopefully they don't deprecate that feature.
Half the battery goes to edge alone on a good day
And it is kind of consistent with Microsoft's new strategy to de-emphasize Windows.
Which is the end result of Webification of our tools.
I think it's just people are used to the OS itself. I've seen people stick to Windows just because even in small companies.
I could well be wrong but I thought with an interpreted language it would be very hard to protect against timing attacks?
Wouldn't a lot of the network communication also be utilising compiled libraries?
Is it to ease shipping new features? To make it easier for contributors once they make the application open source? Good PR?
Office products need to be on the web these days. Having a common code base between desktops, mobile and web makes that much easier and in that world JavaScript is the lowest common denominator.
For instance, see the `Set` implementation here <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... and note that it doesn't even has `union` and `intersection` in the standard library. You have to copy/paste some code and place somewhere to have a minimum usable `Set` implementation.
Pretty much a "pile of trash" in my opinion.
> You have no idea how to use the language because you don't use it.
I do use it daily for more than 15 years.
You're basically praising it with such faint condemnation.
And by your own metric, I can't imagine how bad you think Golang is.
Seriously?
How about async-everything?
Any number of other mature languages have async (and parallel, unlike JS) tools available.
Can you give a simple analysis on what weaknesses JS has that other languages would avoid with no pitfalls of their own?
It was an ad hominem and I asked him to expound on it.
Still not sure if it's just a 'cool hack' or an attempt at a serious product though.
Otherwise, they'll never finish :)
https://www.gnome-look.org/p/1079270/
Hey you know, with a different font and a slightly different colour scheme that wouldn't be far off the Metro look.
And even if (hypotheically) the performance difference a constant 7%, that is still a tangible cost.