Atomist: Meet TypeScript
The Vision
Atomist is a SaaS service that helps you automate the things you care about as a developer. Atomist is essentially an API for your code and how you write code, enabling user-authored editors and executors that act on your source code and development infrastructure and process. You can use the programming model locally on your filesystem, outside the Atomist service, and you can use it connected to remote systems such as Slack and GitHub where we host all the integration and authentication logic for you.
We believe that code-driven customization is the best UI for a product tackling a complex domain and intended for developers. But what’s the ideal language?
We set out with an internal DSL, which we’ve shown in our previous posts. It’s perfect for simpler things, for which it is clear and extremely concise. It allows escaping into JavaScript to evaluate complex expressions, which extends its capabilities. However, complex problems benefit from the full power of a general purpose programming language.
TypeScript And Why We’re Excited About It
We spent a lot of time thinking about this and chose TypeScript as our strategic extension language for the following reasons:
- It’s portable. It compiles to several versions of JavaScript, which can run just about anywhere, including in the JVM.
- It’s enjoyable to code in, taking what’s good about JavaScript and adding strong typing and offering modern features such as type inference.
- Its strong typing option enables excellent tool support, with several good editor choices already. This was a major consideration, as it makes types discoverable and easy to work with.
- It’s well documented, and a community is growing.
- It’s welcoming for those from multiple communities, including JavaScript (as it’s a superset of Javascript); Java (as it looks a lot like Java); and the Microsoft community (as it’s strategic to Microsoft).
We’ve been able to bind our core concepts to idiomatic TypeScript. To the runtime, a compiled TypeScript editor is just like the prior editor written in the DSL.
Here’s the core of a TypeScript editor that manipulates Travis files within a project:
TypeScript’s amenability to tooling makes operations on types easily discoverable in your favorite editor:
We’re fans of what the TypeScript team has accomplished. Embracing it in Atomist feels right.
The full editor from the screenshot is in this repository, which also contains an equivalent DSL version and another, simpler TypeScript editor.