I am Brian Terlson. Ask me anything.

Held on 30 August 2017, 6:00 pm

Brian Terlson works at Microsoft on the things that he loves most: JavaScript, open source, and standards. Brian helps design the ECMAScript language and represents Microsoft at Ecma's TC39 meetings and has been the editor of the ECMAScript standard since ES2016. Brian also works on TypeScript and helps build the open-source JavaScript engine ChakraCore.

Ask Brian Terlson about:

  • ECMAScript
  • TypeScript
  • JavaScript
  • Chakra
  • Working at Microsoft

Thanks everyone for the great questions! This was a lot of fun! Please feel free to reach out to me on twitter (@bterlson) or email (brian dot terlson at microsoft dot com) or IRC (bterlson on freenode) if you would like to chat further. See you out on GitHub!

Susan Dinglesen's photo

How would you explain TypeScript to a novice programmer?

Brian Terlson's photo

I doubt this will be a good answer, but I'll give it a shot :)

TypeScript is just JavaScript but with a type system – a tool that understands how data is shaped and how it flows through your program. The type system lets JavaScript programmers take advantage of advanced editor features and tools like code completion and to prevent bugs that even experienced JavaScript programmers make frequently. TypeScript’s type system is one of the most advanced type systems in significant use, and in many ways eclipses the capabilities of languages like C# and Java while being highly expressive, easier to use, and a much better fit for JavaScript.

TypeScript makes it easier to write correct, bug-free code. For example, it will warn you as you’re writing your code if you call a function with a string instead of a number, access a non-existent property on an object, or if some variable might be null or undefined.

TypeScript also makes it drastically easier to develop large code bases because the type system ensures everything in the program remains consistent. For example, if you want to rename a method of a class, you can just do it and every usage of that method gets updated with the new name.

Depending on the novice, at this point I might go on to describe how one works with types in TypeScript (short answer: type inference, type annotations in jsdoc comments and/or using type annotation syntax), but maybe the above is sufficient. Let me know if you have more questions!

Susan Dinglesen's photo

Thanks for the response. :) Appreciate it.

Dave Burnam's photo

What do you think about recent Facebook ReactJS License controversy? Do you think it's a blow to the OSS world?

How would businesses and startups believe in OSS projects built by big companies like Microsoft, Facebook, Google, etc. in future?

Brian Terlson's photo

Speaking for myself only... (this applies to all my answers)

I am not a lawyer, and am not really an expert on licenses (I know enough to know that, at least). I've read opinions from experts saying that the BSD+Patents license is risky for adopters, and I've read opinions saying it's just fine. I'm not sure where the truth lies.

While I think in practice for most projects the license is unlikely to be a big issue, it is a blow to the extent that we've devoted a bunch of cycles to debating this issue and there are some people who are worried. Thankfully there are a variety of great alternatives to pick from in our ecosystem!

Ribhu Sarma's photo

Thanks for doing the AMA Brian, I would like to know what inspired you to become a developer

Brian Terlson's photo

This is hard to say. It's something I've almost always done! I've been very blessed to have had so many opportunities to become a developer, hone my skills, and apply them in the real world. My parents and a few excellent teachers probably inspired me the most. To call out some specific milestones that probably influenced my path:

  • The Apple ][c my family purchased in the late 80s, upon which I learned basic and the joys of Lode Runner.
  • My fifth grade teacher Mr. G who encouraged me to stay after school to work on the school's website, which I had a lot of fun doing
  • Selling little calculator programs for 5 bucks a pop in middle school
  • Building random web applications in classic ASP for my group of friends in high school
Susan Dinglesen's photo

Do you think TypeScript will be the standard for writing types in ES7/ ES8/ ES9 or whatever in near future?

Brian Terlson's photo

Speaking as someone who proposed types for JavaScript in 2014: I do not believe types are in the cards for the near future. This is an extremely complex problem to get right from a standards perspective. Just adopting TypeScript as the standard would of course be great for TypeScript users, but there are other typed JS supersets with pretty significant usage including closure compiler and flow. These tools all behave differently and it's not even clear that there's a common subset to work from (I don't think there is in any appreciable sense). I'm not entirely sure what a standard for types looks like, and I and others will continue to investigate this as it could be very beneficial, but don't expect anything near term.

Karan Sharma's photo

Hi Brian, It's awesome to see you!

What are the few dev tools (software and hardware) you cannot live without and carry with you always? :)

Show +1 replies
Brian Terlson's photo

Oh, I forgot about my Yubikey! Just wish I could get gnugpg working on WSL.

Brian Terlson's photo

Oh, I also forgot about IRCCloud! Standards are built on IRC, so a good client is indispensable!

Dara Hak's photo

How would you describe your own experience with TC39?

For example, what happens during a meeting? How much time do you dedicate to TC39-related work?

Brian Terlson's photo

I've had a ton of fun working with TC39. I feel really lucky. It's been very rewarding to have an impact on the language that I love and to have so many phenomenal engineers and experts to learn from.

In terms of meetings, they are three days, 8 hours a day, with social events and break out sessions outside of meeting hours. Last meeting we had around 50 delegates all in one giant meeting room United Nations style!

For introverts like me, the meetings are incredibly draining, but I think they are also lots of fun. Delegates bring up agenda items related to language proposals they are working on and the committee discusses them. Delegates work to advance proposals through a staged process. And that's pretty much it at a high level.

Outside of meetings is where most of the TC39 work happens. Delegates are always working on their proposals on GitHub, and there is always editor work to be done on the main specification. I keep tabs on most of the proposals and am deeply involved with a few. These proposal repositories are a great way for everyone reading this to influence the future direction of the language as well :)

I spend probably half my time doing TC39 and standards related work, and I'm very thankful Microsoft lets me spend this much time doing it :)

Dave Burnam's photo

Hi Brian, Have you tried ReactJS library? What are your thoughts on it?

Brian Terlson's photo

I have built a few things with React. I don't have deep thoughts, but I found it to be easy to use (with create-react-app, anyway) and works nice with TypeScript too. I try to use all the big frameworks. It gives valuable perspective for the language work that I do both in TC39 and on TypeScript and Chakra.

Siddarthan Sarumathi Pandian's photo

Hello Brian, thanks for doing this AMA.

These are my questions:

  1. What do you think about libraries like Lodash (and Underscore)? How do you think their functions, say the map functions compares again JavaScript's native map?

  2. What are some exciting features we can watch out for in ES.Next?

Brian Terlson's photo

I like Lodash and Underscore. Very useful libraries. I'm not sure how Lodash functions and native functions compare generally speaking other than the obviously different API.

If ES.Next refers to ES9 (ES2018), then I'd say, hopefully: Async generators, public and private fields for classes, rest/spread for properties, and if we're lucky, a whole slew of new RegExp features (look-behinds, named capture groups, Unicode character classes, dot-all) that will make the RegExp writers among us super happy I think. I'm also really excited about BigInts which is a new number type that can only hold integers but can have any precision you want (to see why this is important, try 9007199254740992 + 1 and see what you get).

Susan Dinglesen's photo

Can you tell us briefly how TC39 works and how are meetings arranged/handled?

Thanks for doing this.

Brian Terlson's photo

I answered some of this in another question, but in terms of how the meetings are arranged - the meeting schedule is set, and then we try to find hosts and locations. It is sometimes hard to find hosts for 50+ people for 3 days! Then we build the agenda on GitHub (you can watch these agendas here), and follow the agenda during the face-to-face meeting.

At a high level, the face to face meetings are all about getting consensus. We never vote, we only proceed with unanimous consent. In practice this might mean someone doesn't like the direction but isn't willing to stand in front of it. But it also means that delegates have to work hard to bring along the entire committee, not just a majority necessary to win approval for a feature. This is TC39's most awesome aspect, in my opinion. It ensures that everyone work together in good faith toward mostly common goals.

Ipseeta Priyadarshini's photo

Hey Brain, thanks for doing AMA, my question to you is what's the performance benefit of Chakra over V8?

Brian Terlson's photo

I don't focus much on performance, but by and large, both engines are extremely fast for any real world use case (i.e. that exists on the Internet). I even help make sure that's the case by reporting performance issues to v8 when I find them! I'm not sure there's a strong performance reason to use one over the other, especially now that V8 has an interpreter too.

Tommy Watson's photo

What did you use in your recent project? ES6 or ES5? And why?

Brian Terlson's photo

ES8, actually! My latest project is adding a --install flag for eshost-cli to install javascript hosts from public file shares so you can use the tool without manually downloading or compiling your own from source. I struggled with putting the logic into promises, but because it's really branchy and includes loops, it was very hard to reason about. Using async functions instead made it almost trivial! I love that feature (and not just because I championed it ;)). Yeah, now I have a node 8 dependency, but I could fix that with a transpiler if I cared enough.

Tommy Watson's photo

What are the few things missing in ES6 and you would like to see in future upgrades?

Brian Terlson's photo

This is a pretty long list! I'm a fan of most things you'll find on the proposals repository. At a high level we're looking at:

  • Improvements to classes (the ES6 design was deemed maximally minimal - the most we could get consensus on at the time - and the intention was always to come back and add more capabilities over time including decorators and private and public fields)
  • Improvements for functional programming
    • Pattern matching (see my proposal here).
    • Pipeline operator & syntax for partial application
  • Async programming improvements (including cancellation primitives)
  • Fixing the Date dumpster fire
Harrison Kamau's photo

Hi Brian,

Why would you choose TypeScript over CoffeeScript?

What major changes, if any, should we look out for in the consequent ECMAScript releases?

Brian Terlson's photo

I would choose TypeScript over CoffeeScript for a lot of reasons! As someone who did professional Ruby development for a number of years, I have a soft spot for CoffeeScript, but I wouldn't use it today personally. First, TypeScript offers a type system which is extremely useful especially for editor tooling. Second, TypeScript is built on JavaScript so it's the same syntax with the exception of the extensions for type annotations (which are optional anyway with TypeScript's --checkJs flag) and is easier to learn. Third, many of the features which made CoffeeScript great have been incorporated into ECMAScript and therefore TypeScript itself, so many of the reasons to use CoffeeScript are no longer true.

I've answered previously about what's coming up. In general you can always keep tabs on the proposals repo - the higher the stage, the more likely it'll be in the next version!

Tal's photo

Hi Brian,

Would love to hear your opinion on what's the best error reporting tool for JavaScript applications ( Both Node and front end frameworks)? I'm currently looking into various error reporting tools for my companies JS applications (Node/Koa/React and Node/Express/Backbone).

Brian Terlson's photo

For Node, I've only ever used Azure AppInsights which did auto-reporting of errors, perf telemetry, and a few other things with little setup. It was pretty nice overall. But I can't speak for how well it stacks up vs. other solutions out there. Sorry I can't help more!

David Cameron's photo

What are Microsoft's long term plans for Chakra?

Brian Terlson's photo

You can see some of our long term plans on the GitHub roadmap. We're continuing to invest in WebAssembly, with lots of work to be done there. We're continuing to improve performance across real world scenarios and implementing the latest and greatest language features coming out of TC39 as well. But this is mostly just our DNA - see the roadmap for more details :)

Orta's photo

What are unexplored spaces in the TypeScript eco-system you'd like to see people explore further?

Brian Terlson's photo

I'm more excited about what I can't see than what I can! But one thing that I've been thinking about lately is how Machine Learning can be applied to TypeScript, both in terms of using ML to gather information and inform TypeScript's design, and perhaps TypeScript itself using ML to infer complex things about your programs or carry out complex context-dependent tasks like refactorings or what-have-you. I feel like agent-assisted programming is going to be a thing in the future.

James Franko's photo


What tools/setup do you use to make your development workflow more productive?

Brian Terlson's photo

So many things. Mentioned a couple already: VSCode and Hyper. A couple recent additions that I really love: the VSCode prettier extension that gives me format-on-save, and the Git Lens VSCode extension which shows inline git blame annotations. I use blame ALL the time for ECMA262 so having it inline has been a huge time saver.

Another task I do very frequently is compare how snippets of code run across various runtimes (Chakra, v8, Spidermonkey, JSC, etc). I build a tool called eshost that abstracts the differences between these runtimes and compares the results of them. This has probably saved me days of manual effort.

Madhankumar's photo

Hey Brian. Madhan here, I am a junior JavaScript developer. Loves to work with JavaScript (JS for life).

I have seen TC39 proposals in Github. On what basis you guys will accept the proposals?

Recently I have come to know that ~~5.3 == Math.floor(5.3).

I think Math.floor() gives better readability. What do you think about that?

Describe something about JavaScript?

Brian Terlson's photo

JS For Life!!

Proposals follow this process document, which has all the entrance and exit criteria for each stage along the way. We accept basically any proposal from a delegate as Stage 0. The requirements get progressively steeper as you move along the process.

I'm usually not a fan of opaque patterns for saving keystrokes. I agree with you that Math.floor gives better readability here. I think the only shortcut I allow is !! for, essentially, ToBoolean.

Mike Smith's photo

How and when did you start your career as a programmer? Would you mind telling us about your story?

Brian Terlson's photo

I mentioned a bit of it here. I've been a programmer for so long I don't really exactly recall when I started!

But, to continue that narrative, my senior year of high school was probably when my career technically started. I got a job building a simple ASP website for a small manufacturing education company. This job put me through college, along with another web dev job for a small human resources consultancy. Eventually both projects moved from classic ASP to Rails.

After graduating with a degree in CSci from the University of Minnesota, I did a startup thing for a while. Built a really cool app to make it easy for HR departments to survey compensation and benefits practices from their peer companies while complying with federal antitrust guidelines. It was a lot of fun and I learned a lot, but it was failing and Microsoft made me an offer to come work for them on the Test team for Chakra and, well, here I am almost 8 years later :)

Mike Smith's photo

Should new developers learn ES6 directly or should they grasp old JS first?

Brian Terlson's photo

I don't think I am prescriptive about this. Some people learn better by understanding the foundation (say, closures and prototypes) and then moving up. Others learn better by understanding the high level (classes) and dig down when needed. I'm not sure one way is better than the other personally!

Dylan Frazier's photo

What can we (as a community) do to encourage more and more developers to contribute to open source? I know many developers who want to contribute, but they don't know how to start. Besides most of their time is spent fixing bugs at their respective companies.

Brian Terlson's photo

This is a question I consider every day, and I wish I had a good answer. I'm not an expert on building communities. Some ideas I think work:

  • Foster a community that is respectful and inclusive, especially to people with different backgrounds and experience levels.
  • Call out specific tasks that new contributors might be able to tackle(ChakraCore has a your-first-pr label, for example). Offer mentorship if possible to help contributors make their first contribution as well.
  • Encourage non-code contributions. Things like documentation, PR/issue templates, wiki, etc. are often more important than feature work.
  • Evangelize. I've been speaking at some conferences lately about how people can get involved with ECMAScript. Sometimes directly reaching out to people is all the push they need to get involved.

Fundamentally, though, if your employer can't support you working on open source, you'll have to carve time for it. This can be hard and I don't have any good ideas to make it easier.