ClojureScript vs TypeScript

Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

ClojureScript
ClojureScript

119
104
+ 1
2
TypeScript
TypeScript

12.3K
9.5K
+ 1
407
Add tool

ClojureScript vs TypeScript: What are the differences?

ClojureScript: A Clojure compiler targeting JavaScript. ClojureScript is a compiler for Clojure that targets JavaScript. It is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler; TypeScript: A superset of JavaScript that compiles to clean JavaScript output. TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.

ClojureScript and TypeScript are primarily classified as "Languages" and "Templating Languages & Extensions" tools respectively.

ClojureScript and TypeScript are both open source tools. It seems that TypeScript with 51.2K GitHub stars and 7.07K forks on GitHub has more adoption than ClojureScript with 8.12K GitHub stars and 724 GitHub forks.

According to the StackShare community, TypeScript has a broader approval, being mentioned in 982 company stacks & 1455 developers stacks; compared to ClojureScript, which is listed in 24 company stacks and 17 developer stacks.

What is ClojureScript?

ClojureScript is a compiler for Clojure that targets JavaScript. It is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler.

What is TypeScript?

TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose ClojureScript?
Why do developers choose TypeScript?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
      Be the first to leave a con
      What companies use ClojureScript?
      What companies use TypeScript?

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with ClojureScript?
      What tools integrate with TypeScript?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to ClojureScript and TypeScript?
      JavaScript
      JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
      Elm
      Writing HTML apps is super easy with elm-lang/html. Not only does it render extremely fast, it also quietly guides you towards well-architected code.
      Clojure
      Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.
      AngularJS
      AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding.
      PureScript
      A small strongly typed programming language with expressive types that compiles to JavaScript, written in and inspired by Haskell.
      See all alternatives
      Decisions about ClojureScript and TypeScript
      Eli Hooten
      Eli Hooten
      CTO at Codecov · | 13 upvotes · 70.7K views
      atCodecovCodecov
      TypeScript
      TypeScript
      JavaScript
      JavaScript
      CoffeeScript
      CoffeeScript
      Vue.js
      Vue.js
      Visual Studio Code
      Visual Studio Code

      We chose TypeScript at Codecov when undergoing a recent rewrite of a legacy front end. Our previous front end was a mishmash of vanilla JavaScript and CoffeeScript , and was expanded upon haphazardly as the need arose. Without a unifying set of paradigms and patterns, the CoffeeScript and JavaScript setup was proving hard to maintain and expand upon by an engineering team. During a move to Vue.js , we decided to also make the move to TypeScript. Integrating TypeScript and Vue.js is fairly well understood at this point, so the setup wasn't all that difficult, and we felt that the benefits of incorporating TypeScript would outweigh the required time to set it up and get our engineering team up to speed.

      Choosing to add TypeScript has given us one more layer to rely on to help enforce code quality, good standards, and best practices within our engineering organization. One of the biggest benefits for us as an engineering team has been how well our IDEs and editors (e.g., Visual Studio Code ) integrate with and understand TypeScript . This allows developers to catch many more errors at development time instead of relying on run time. The end result is safer (from a type perspective) code and a more efficient coding experience that helps to catch and remove errors with less developer effort.

      See more
      Clojure
      Clojure
      ClojureScript
      ClojureScript
      JavaScript
      JavaScript
      Java
      Java
      C#
      C#

      I adopted Clojure and ClojureScript because:

      • it's 1 language, multiple platforms.
      • Simple syntax.
      • Designed to avoid unwanted side effects and bugs.
      • Immutable data-structures.
      • Compact code, very expressive.
      • Source code is data.
      • It has super-flexible macro.
      • Has metadata.
      • Interoperability with JavaScript, Java and C#.
      See more
      Flow (JS)
      Flow (JS)
      Java
      Java
      React Native
      React Native
      TypeScript
      TypeScript

      I use TypeScript for Web Applications and for both frontend and backend because it has a lot of tooling around it and they really got the types and type safety right. Flow (JS) on the other hand lacks tooling and most of the times I scramble to find the right way of building my contracts in which TypeScript is very intuitive and natural. Additionally TypeScript is very similar to Java so your backend engineers and full stack engineers can work with it without much of context switch.

      The only time I think Flow shines is (based on probably my outdated knowledge) Flow is/was the only option if you want/wanted to build a React Native application mainly because React Native transpiler at the time I was working with it would only work with flow.

      See more
      TypeScript
      TypeScript
      Flow (JS)
      Flow (JS)

      I use TypeScript because it isn't just about validating the types I'm expecting to receive though that is a huge part of it too. Flow (JS) seems to be a type system only. TypeScript also allows you to use the latest features of JavaScript while also providing the type checking. To be fair to Flow (JS), I have not used it, but likely wouldn't have due to the additional features I get from TypeScript.

      See more
      David Koblas
      David Koblas
      VP Engineering at Payment Rails · | 9 upvotes · 14.9K views
      atPayment RailsPayment Rails
      JavaScript
      JavaScript
      Flow (JS)
      Flow (JS)
      TypeScript
      TypeScript

      We originally (in 2017) started rewriting our platform from JavaScript to Flow (JS) but found the library support for Flow was lacking. After switching gears to TypeScript we've never looked back. At this point we're finding that frontend and backend libraries are supporting TypeScript out of the box and where the support is missing that the commuity is typically got a solution in hand.

      See more
      Forrest Norvell
      Forrest Norvell
      engineering manager at self-employed · | 6 upvotes · 96.1K views
      TSLint
      TSLint
      ESLint
      ESLint
      Flow (JS)
      Flow (JS)
      Visual Studio Code
      Visual Studio Code
      TypeScript
      TypeScript

      I use TypeScript because the tooling is more mature (the decision to discontinue TSLint in favor of moving all its checks to ESLint is a thoughtful and mature decision), there's a ton of examples and tutorials for it, and it just generally seems to be where the industry is headed. Flow (JS) is a fine tool, but it just hasn't seen the uptake that TS has, and as a result is lacking a lot of the nicer small things, like thorough Visual Studio Code integration, offered by TS.

      See more
      TypeScript
      TypeScript
      Flow (JS)
      Flow (JS)
      Visual Studio Code
      Visual Studio Code

      We currently use TypeScript at work. Previously we used Flow (JS) but it was sometimes really difficult to make the types work the way you want. Especially non-trivial types were problematic. And the IDE support wasn't good, Flow took too much resources and sometimes remain stuck and do not show errors (I use Visual Studio Code). With TypeScript we almost do not have these problems. IDE support is superb, working with types is much easier and typing system seems more mature and powerful. There are some downsides (like partion inheritance etc.), but TS team is still pushing it forward. So for me TypeScript is clear winner.

      See more
      JavaScript
      JavaScript
      TypeScript
      TypeScript
      Flow (JS)
      Flow (JS)

      If you will start a project from scratch I recommend to use TypeScript. But, If you work with legacy projects written in JavaScript I recommend Flow (JS). Both tools have the same objective: reduce the bad code (which create illegible code, generate bugs e problems to maintenance). Flex helps you to avoid fall in bad codes, but TypeScript prevent you to c you to create bad codes. I believe cause this some JavaScript fans don't like TS, because TS block you to write some types o code. This is the fundamental difference between TS and Flow: Flow avoid problems, but no force. TS force you to prevent problems.

      See more
      AngularJS
      AngularJS
      React
      React
      .NET Core
      .NET Core
      TypeScript
      TypeScript

      I use TypeScript because it's adoption by many developers, it's supported by many companies, and it's growth. AngularJS, React, @ASP.NET Core. I started using it in .NET Core, then for a job. Later I added more Angular experience and wrote more React software. It makes your code easier to understand and read... which means it makes other people's code easier to understand and read.

      See more
      TypeScript
      TypeScript

      I use TypeScript because:

      • incredible developer tooling and community support
      • actively developed and supported by Microsoft (yes, I like Microsoft) ;)
      • easier to make sense of a TS codebase because the annotations provide so much more context than plain JS
      • refactors become easier (VSCode has superb support for TS)

      I've switched back and forth between TS and Flow and decided a year ago to abandon Flow completely in favor of TS. I don't want to bash Flow, however, my main grievances are very poor tooling (editor integration leaves much to be desired), a slower release cycle, and subpar docs and community support.

      See more
      Gustavo Muñoz
      Gustavo Muñoz
      Web UI Developer at Globant · | 2 upvotes · 6.3K views
      Angular 2
      Angular 2
      TypeScript
      TypeScript
      React
      React
      Flow (JS)
      Flow (JS)
      JavaScript
      JavaScript
      CoffeeScript
      CoffeeScript
      #Angular
      #ECMA

      Long ago when Angular 2 evolved I had to decide between the new #Angular and TypeScript or React. I really love typing my code, but forced to use TypeScript was a bit too much. I prefer the new #ECMA standard and the evolution of the old and reliable JavaScript. So finding Flow (JS) was an incredible milestone in my career as a developer. Finally, I could use types in my code, and JavaScript with the new standard. I already had the experience of CoffeeScript, so TypeScript was not an option.

      See more
      TypeScript
      TypeScript
      CoffeeScript
      CoffeeScript
      JavaScript
      JavaScript
      Flow (JS)
      Flow (JS)

      From a StackShare community member: "We are looking to rewrite our outdated front-end with TypeScript. Right now we have a mix of CoffeeScript and vanilla JavaScript. I have read that adopting TypeScript can help enforce better code quality, and best practices. I also heard good things about Flow (JS). Which one would you recommend and why?"

      See more
      Jason Barry
      Jason Barry
      Cofounder at FeaturePeek · | 4 upvotes · 15K views
      atFeaturePeekFeaturePeek
      Flow (JS)
      Flow (JS)
      TypeScript
      TypeScript
      React
      React
      JavaScript
      JavaScript
      Sublime Text
      Sublime Text
      Babel
      Babel
      Yarn
      Yarn
      npm
      npm
      #Frontend

      I think our #Frontend stack is pretty standard – but we have taken some deviations from a typical modern stack:

      • Flow (JS) instead of TypeScript. Flow was an easy choice 2+ years ago, as both flow and React were (and still are) maintained by Facebook. Today, it seems that the JavaScript community has settled on TypeScript as the winner. For new projects, I'd choose TS, but I don't see the point in migrating an existing project from flowtype to TS, when the end result will be roughly the same. Sure, memory usage is a bit high, and every now and then I have to kill some zombie processes, but our text editors (Sublime Text), CI scripts, and Babel are already set up to take advantage of the type safety that flow offers. When/if the React team writes React itself in TS, then I'll take a closer look – until then, flow works for us.

      • Yarn instead of npm. When yarn debuted, we never looked back. Now npm has pretty much caught up with speed and lockfiles, but yarn gives me confidence that my dependency installs are deterministic. Really interested in the plug-n-play (PnP) feature that removes the need for a node_modules folder, but haven't implemented this yet.

      See more