<p>I recognize that not everyone designing a new language is doing it to compete with other languages in the same problem/application-domain and achieve (and retain over time) similar adoption levels. But for those who are, what overarching, high-level design strategies matter and why? How do those design strategies help achieve that goal?</p>
<p>Some additional qualification / scope narrowing of the question:</p>
<ul>
<li><p>I realize that the words &quot;long-term adoption&quot; and &quot;widespread adoption&quot; are pretty murky/ambiguous. More concrete descriptions might might be &quot;adoption growing and lasting over the next 20+ years&quot;, and &quot;adoption at a similar scale to other widely-adopted languages occupying a similar problem-domain(s)&quot;.</p>
</li>
<li><p>This is a question about overarching design strategies for the stated goal- not about things like the language design team having enough funding, having good teamwork, quality of &quot;product&quot;, rollout, or investment in marketing. It's about what the <em>language</em> has to do or be to have a place in the ecosystem it wants to enter- not about what the <em>people designing it</em> have to do on top of designing it.</p>
</li>
<li><p>This question applies equally to new languages (and their tooling ecosystems) designed to compete with other ones in a similar problem/application-domain, or new languages designed to evolve such existing languages in ways that the designers of those languages choose not to.</p>
</li>
</ul>
<p>Please give concrete examples from languages who have used the design strategies you name and have went on to achieve the stated goal. I.e. back up your claims with evidence. This question intentionally doesn't constrain the sought examples to any one specific language. What I'm seeking here is a bigger-picture view.</p>
<p>Another title for this question might have been (sorry for any leading of the question here): &quot;What overarching design strategies have contributed to the adoption of languages such as C++, TypeScript, Kotlin, and others?&quot; (because I think they're mention-worthy examples of languages that have (to varying but significant degrees) succeeded in attaining those goals in those circumstances)</p>

<language-design>
What design strategies matter for new languages seeking long-term, widespread adoption when approaching a problem-domain with existing languages?
CC BY-SA 4.0
2023-05-22T02:03:07.360Z
related discussion on meta: https://languagedesign.meta.stackexchange.com/q/232/251
starball
CC BY-SA 4.0
2023-05-22T08:48:56.407Z
more related meta discussion: https://languagedesign.meta.stackexchange.com/q/235/251
starball
<p>Attribution: This answer presents the ideas of Herb Sutter, based on <a href="https://youtu.be/BF3qw1ObUyo" rel="nofollow noreferrer">his talk at cpponsea 2020, &quot;<em>How to answer &quot;why will yours succeed, when X, Y, and Z have failed?&quot;</em>&quot;</a>. I've tried to elaborate by adding some additional examples.</p>
<p>The overarching strategies Herb presents are value, availability, and compatibility (with focus on compatibility), where the points made about value and availability are deeply connected to the point about compatibility.</p>
<p>These points are presented from an analysis of common design strategies of the languages that came into problem/application-domains with pre-existing, well-established languages, and which survived, going on to achieve usage-levels of comparable scale to the languages which came before them.</p>
<h3>Strategy 1: Value by-Design</h3>
<p>This strategy is about answering the question &quot;why would anyone want to go from the language they're using to this new language?&quot;</p>
<p>To do that, you need to make a distinct, articulable new value proposition (like making an elevator pitch), and the easiest way to do that is to address existing/known pain points with already-adopted languages that already resonate with people and are well-understood- not just solving the same problems in the shared problem/application-domain, but also problems in existing solutions. For example (note: I find some statements in these &quot;elevator pitches&quot; subjective, but have left them as-is intentionally):</p>
<ul>
<li><p>From <a href="https://isocpp.org/wiki/faq/c#c-diffs" rel="nofollow noreferrer">the ISO C++ wiki</a>: C++ is C with stronger type-checking (addressing pain-points with C's type system), wider support for different programming styles (but still including those of C, while allowing you to program &quot;closer to the problem domain than the solution domain&quot;), and more notational support without loss of efficiency (this isn't a pain-point for all C users, but it is to some), and support for data abstraction, object-oriented-programming, resource management, and generic programming (addressing pain-points related to a (relatively speaking) lack of those features in C). That's in terms of features. In terms of the problem/application-domain, from <a href="https://isocpp.org/wiki/faq/big-picture#why-invented" rel="nofollow noreferrer">the ISO C++ wiki's section on why C++ was invented</a> states: &quot;<em>Stroustrup wanted to write efficient systems programs in the styles encouraged by Simula67. [...] The more general aim was to design a language in which developers could write programs that were both efficient and elegant. Many languages force you to choose between those two alternatives.</em>&quot;</p>
</li>
<li><p>From <a href="https://www.typescriptlang.org/" rel="nofollow noreferrer">TypeScript's website</a>: &quot;<em>TypeScript is JavaScript with syntax for types.</em>&quot; (you can guess what the pain-point is) . See also <a href="https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals" rel="nofollow noreferrer">the design goals</a>, which include: &quot;<em>Statically identify constructs that are likely to be errors.</em>&quot; and &quot;<em>Provide a structuring mechanism for larger pieces of code.</em>&quot;</p>
</li>
<li><p>From Kotlin's Getting Started docs: &quot;<em>Kotlin is a modern but already mature programming language aimed to make developers happier. It's concise, safe, interoperable with Java and other languages, and provides many ways to reuse code between multiple platforms for productive programming.</em>&quot; (Ex. pain-points with concision in Java)</p>
</li>
</ul>
<p>There are at least two pitfalls with designing value propositions for a new language:</p>
<ul>
<li>To underestimate the value of of existing languages and code written in them. What a designer of a new language might call &quot;legacy / old / complex&quot; in an existing language is what a programmer in that language might as equally likely call &quot;proven / working / robust (with flaws)&quot;</li>
<li>To underestimate the cost of parity: having already built something in one language, and then having to spend what it takes to build that again in a new language while achieving similar feature, performance, and stability (and often having to continue to support the previous version).</li>
</ul>
<h3>Strategy 2: Availability by-Design</h3>
<p>This strategy is about answering the question &quot;how do I make the value of this new language available to users of existing languages in this space?&quot;</p>
<p>The &quot;Holy Grail&quot; of this aspect of strategy is to be able to achieve a solution where users of well-established languages in the same problem/application-domain can easily add code in your new language to their existing projects written in the existing languages.</p>
<p>This can be seen in the following technologies (and bleeds into the next section's point on the strategy of compatibility):</p>
<ul>
<li><p>From <a href="https://isocpp.org/wiki/faq/c#is-c-a-subset" rel="nofollow noreferrer">the ISO C++ wiki's section: &quot;Is C a subset of C++?&quot;</a>: &quot;<em>C++ supports every programming technique supported by C95 (C90 plus an Amendment) and earlier. Every such C program can be written in essentially the same way in C++ with the same run-time and space efficiency. It is not uncommon to be able to convert tens of thousands of lines of ANSI C to C-style C++ in a few hours.</em>&quot; See also <a href="https://isocpp.org/wiki/faq/big-picture#back-compat-with-c" rel="nofollow noreferrer">the ISO C++ wiki's FAQ, &quot;Is C++ backward compatible with ANSI/ISO C?&quot;</a> (TL;DR &quot;<em>Almost</em>&quot;)</p>
</li>
<li><p>Cfront (tooling): A compiler that compiled C++ to C. It was therefore available for use with (compatible with) with any C tooling.</p>
</li>
<li><p>TypeScript: You can see availability written into <a href="https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals" rel="nofollow noreferrer">the design goals</a>: &quot;<em>Preserve runtime behavior of all JavaScript code.</em>&quot;, &quot;<em>Use a consistent, fully erasable, structural type system.</em>&quot;, and &quot;<em>Be a cross-platform development tool.</em>&quot;</p>
</li>
<li><p>Some Kotlin-related tools have features to translate Java code into Kotlin code (Ex. JetBrains IDEs). Kotlin can be compiled to Java bytecode (that's not particularly interesting, since <a href="https://en.wikipedia.org/wiki/List_of_JVM_languages" rel="nofollow noreferrer">a lot of other languages do too</a>, but I find it noteworthy here).</p>
</li>
<li><p>(tooling): Swift is available to developers through Xcode on any Objective-C-supported platform.</p>
</li>
<li><p>(tooling): Rosyln C# compiler is available to developers through Visual Studio on Visual C#-supported platforms.</p>
</li>
</ul>
<h3>Strategy 3: Compatibility by-Design</h3>
<p>Look at an adoption function as relating value as a function of effort. Would you as a user prefer an adoption function like a single-step step function (where all of the effort needs to happen all at once and you go from zero to 100% of the value), or an adoption function like a linear function (where you can put in the effort gradually and reap the value in proportion to the effort you have put in so far)?</p>
<p>Herb presents a minimum bar that code written in the new language should be able to seamlessly use code from the existing language (/languages)- whether through source or binary compatibility (Ex. FFI, byptecode, etc.). Ideally it would be seamless both ways, but old-to-new should be seamless at a minimum.</p>
<p>The &quot;Holy Grail&quot; of this design strategy would be that it take zero-effort to go from the existing language to the new language.</p>
<p>The examples given in the &quot;Availability by Design&quot; section also make sense here. In addition:</p>
<ul>
<li><p>Any C++ code can call C code (see also <a href="https://isocpp.org/wiki/faq/mixing-c-and-cpp" rel="nofollow noreferrer">the ISO C++ wiki's page on &quot;How to mix C and C++&quot;</a>). In the 1980's (no longer true for newer C++ language versions, but still &quot;largely true&quot;), you could give C source code to a C++ compiler and it would compile and give the same behaviour.</p>
<p>Quoting from a review of D&amp;E by Al Stevens written for Dr. Dobb's Journal, August 1994 (you can find a snippet of it <a href="https://stroustrup.com/dne.html" rel="nofollow noreferrer">here</a>):</p>
<blockquote>
<p>[Stroustrup] could have assigned less importance to compatibility with C. &quot;Within C++, there is a much smaller and cleaner language struggling to get out,&quot; which he says &quot;would ... have been an unimportant cult language.&quot; Second, he is committed to the concept of static (as opposed to dynamic) type checking as being inherently safer and essential to retain the efficiency of C. Without that guarantee, programmers used to C's efficiency will not switch to a new language no matter what promise it holds.</p>
</blockquote>
</li>
<li><p>Any valid JavaScript code is valid TypeScript code (and you can already start getting some of the benefit of the TypeScript compiler's static analysis with almost no effort). Also in <a href="https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals" rel="nofollow noreferrer">TypeScript's design goals</a>: &quot;<em>Impose no runtime overhead on emitted programs.</em>&quot;, &quot;<em>Emit clean, idiomatic, recognizable JavaScript code.</em>&quot;, &quot;<em>Align with current and future ECMAScript proposals.</em>&quot; (a degree of forward compatibility with future JS), &quot;<em>Do not cause substantial breaking changes from TypeScript 1.0.</em>&quot; (a degree of self-backward compatibility between major versions).</p>
</li>
<li><p>From SASS's <a href="https://sass-lang.com/guide" rel="nofollow noreferrer">&quot;Basics&quot; documentation page</a>: &quot;<em>Sass has two syntaxes! The SCSS syntax (.scss) is used most commonly. It's a superset of CSS, which means all valid CSS is also valid SCSS.</em>&quot;</p>
</li>
<li><p>Swift has very good bi-directional compatibility with Objective-C. They can call into each other, Objective-C object-layout and reference-counted-lifetime models are the same in Swift, and tooling support can do bridging header generation and view Object-C code as equivalent Swift code.</p>
</li>
</ul>
<p>In those examples, compatibility came at costs- whether in implementation or in costs of holding on to <em>some</em> problems from existing languages, but it was deemed worthwhile to achieve the desired levels of adoption.</p>
<p>Some &quot;counterexamples&quot;:</p>
<ul>
<li><p>Dart didn't achieve high compatibility with JS from the start, and it's still working on it in at the time of this writing: <a href="https://github.com/dart-lang/sdk/issues/35084" rel="nofollow noreferrer">https://github.com/dart-lang/sdk/issues/35084</a>.</p>
</li>
<li><p>Borland Delphi did very well with designing for value and availability, and achieved compatibility at the start, but couldn't maintain it (difficult due to Borland being a separate company from Microsoft, which led to Borland always being behind the latest platform features).</p>
</li>
<li><p>Python 3 is source incompatible with Python 2, and requires a mix of tool-assisted and manual migration (see also <a href="https://docs.python.org/3/howto/pyporting.html" rel="nofollow noreferrer">https://docs.python.org/3/howto/pyporting.html</a>). And even nine years after Python 3 was released in 2008, a study showed that a significant amount of (purportedly most) code was still using a mix of Python 2 and 3 (<a href="https://ieeexplore.ieee.org/document/8170118" rel="nofollow noreferrer">source</a>), and even though Python 2 was officially frozen and unsupported in 2020, <a href="https://www.jetbrains.com/lp/python-developers-survey-2019/#PythonVersions" rel="nofollow noreferrer">the JetBrains developer survey of October 2019 found that</a> only 90% of respondents were using Python 3.</p>
</li>
<li><p>C++11's ABI break banning reference-counting for <code>std::string</code>. GCC implemented the conforming implementation in 2015 with version 5.1, and adoption of that took years. The feature was disabled by default on Red Hat Linux's GCC 8 until 2019.</p>
</li>
</ul>
<p>There's a pattern in the above examples: historically, it has often taken ~10 years to adopt new things without a strong compatibility bridge. The lesson being- if you want to do something that isn't compatible with well-established solutions in the problem/application-space and you have a good value proposition, don't be surprised if adoption to &quot;well-established&quot; levels takes something on the order of 10 years / an extra 10 years.</p>
<p>Some other compatibility-related pitfalls given the stated goals include (at <a href="https://youtu.be/BF3qw1ObUyo?t=2499" rel="nofollow noreferrer">41:39</a>): function &quot;colouring&quot; (dialect bifurcation) and the same code meaning different things to different but largely languages or language versions.</p>
<hr />

<p>Another interesting note (but probably better left to another Q&amp;A): these newer languages sometimes influence the existing languages:</p>
<ul>
<li>For C and C++, see also <a href="https://en.cppreference.com/w/c/23" rel="nofollow noreferrer">https://en.cppreference.com/w/c/23</a> and <a href="https://thephd.dev/c23-is-coming-here-is-what-is-on-the-menu" rel="nofollow noreferrer">https://thephd.dev/c23-is-coming-here-is-what-is-on-the-menu</a>.</li>
<li>For JavaScript and TypeScript, see <a href="https://github.com/tc39/proposal-type-annotations" rel="nofollow noreferrer">https://github.com/tc39/proposal-type-annotations</a>.</li>
</ul>

CC BY-SA 4.0
2023-05-19T08:36:19.360Z
2023-05-19T21:29:42.717Z
2023-05-19T21:29:42.717Z
starball
CC BY-SA 4.0
2023-05-19T21:30:43.283Z
feel free to suggest additional examples either by suggesting edits or by commenting. Either way, please provide evidence to back up the info (Ex. links to more or less "official" (from the mouths of the maintainers) writings as I have done).
starball
CC BY-SA 4.0
2023-11-05T15:22:50.657Z
Kotlin is notable for having very high interoperability with Java (unlike, for example, Scala), having made it a design point. Java code is easily usable from Kotlin and the Kotlin team tries to make sure you can use as much Kotlin code from Java as possible. I often have projects where Java and Kotlin code are mixed in the same project.
Seggan
<p>When developing a new language, existing languages which have built up stability and community will always have the advantage. So you really need a way to make your language worthwhile.</p>
<p>Here is what Rust, Kotlin, TypeScript, and Swift (all languages which have superseded others in their domain) have done.</p>
<h1>Significantly improve upon the competition</h1>
<p>You can't just fix one small problem and expect others to prefer your language. Rust's greatest strengths are C++'s greatest weaknesses: easy package management, safe memory-management, sensible generics, actual &quot;Algebraic Data Types&quot;. Also, any of these features <em>alone</em> wouldn't have given Rust the widespread adoption it has today: a C++-like with strict safety guarantees would probably get adopted by safety-critical, performance-critical programs, but it would never reach mainstream adoption or adoption anywhere near C++'s numbers. Swift also out-done Objective-C with better performance <em>and</em> modern language design, and Kotlin out-done Java with less verbosity and footguns; but even these languages needed more than improvements alone to gain popularity...</p>
<h1>Industry support</h1>
<p>Rust was developed with the help of Mozilla, Swift was developed by Apple, Kotlin was developed by JetBrains, and TypeScript was developed by Microsoft. A random nobody, or even a super-talented developer whose famous but only in the inner tech circles, will have a much harder time building up their language's community. And community is what makes or breaks a language, as technology keeps evolving: you need community to provide the utility libraries, resources, and platform support necessary for your language to become usable (and therefore get even more community). Industries also have the ability to make their language the default in their other products and platforms: Swift was created to be the main language for macOS and iOS, and Kotlin only really became popular once it became the main language for Android.</p>
<h1>Integration with existing tooling</h1>
<p>This is where TypeScript in particular shines: not only can TypeScript code import JavaScript code and vice versa, not only does it compile to JavaScript, but TypeScript compiles to <em>readable</em> JavaScript and thus can even be used by JavaScript debuggers (when sourcemap fails, but this happens suprisingly often). Swift has interop with Objective-C, Kotlin has interop with Java and can target every JVM, and Rust has interop with C++.</p>
<h1>It takes time and stabilization</h1>
<p>None of these languages were popular when officially released, and even today, there are many projects which would clearly benefit from them but have yet to migrate. Before it becomes popular, a language needs to stabilize: nobody wants to use a new language only to have to throw out their code because of massive API-breaking changes (which often happened in before Rust 1.0 and Swift 3, or was it 4?) A language also needs to become reliable: nobody wants to use a buggy language, and even with ample testing and good practices a new language is practically guaranteed to have <em>many</em> bugs (even Rust and Kotlin still have some bugs today). And even if the language itself is perfect, it needs community resources and packages, developer training, and a general sign that it and its community is here to stay. Ultimately, many of these languages took <em>years</em> of development before they became remotely mainstream; developing a new language is a long-term effort.</p>

CC BY-SA 4.0
2023-05-20T00:46:03.760Z
2023-05-20T00:46:03.760Z
tarzh
CC BY-SA 4.0
2023-05-20T00:52:56.760Z
hm. While important, I'm not sure if "Industry support" is really a _design strategy_. See also the question post's constraints, which states: "_This is a question about overarching strategies for the stated goal- not about things like the language design team having enough funding, having good teamwork, quality of "product", rollout, or investment in marketing._"
starball
CC BY-SA 4.0
2023-05-20T00:54:13.073Z
note: the rest of what you've written largely seems to be related to or repeating Herb's points in his cpponsea talk (which I've used in my answer post).
starball
CC BY-SA 4.0
2023-05-20T01:59:27.010Z
to elaborate, your "_Significantly improve upon the competition_" sectionreally only adds the rust example to Herb's point about "value by-design", your "_Integration with existing tooling_" section is just a subset of Herb's points (and my extended examples) about availability by-design and compatibility by-design, and your "_It takes time and stabilization_" section is strongly related (a subset of?) Herb's side-point on the consequences of not having a good compatibility by-design strategy.
starball
# What design strategies matter for new languages seeking long-term, widespread adoption when approaching a problem-domain with existing languages?
Posted by: username_0 on 2023-05-19
I recognize that not everyone designing a new language is doing it to compete with other languages in the same problem/application-domain and achieve (and retain over time) similar adoption levels. But for those who are, what overarching, high-level design strategies matter and why? How do those design strategies help achieve that goal?

Some additional qualification / scope narrowing of the question:

* I realize that the words "long-term adoption" and "widespread adoption" are pretty murky/ambiguous. More concrete descriptions might might be "adoption growing and lasting over the next 20+ years", and "adoption at a similar scale to other widely-adopted languages occupying a similar problem-domain(s)".
* This is a question about overarching design strategies for the stated goal- not about things like the language design team having enough funding, having good teamwork, quality of "product", rollout, or investment in marketing. It's about what the *language* has to do or be to have a place in the ecosystem it wants to enter- not about what the *people designing it* have to do on top of designing it.
* This question applies equally to new languages (and their tooling ecosystems) designed to compete with other ones in a similar problem/application-domain, or new languages designed to evolve such existing languages in ways that the designers of those languages choose not to.

Please give concrete examples from languages who have used the design strategies you name and have went on to achieve the stated goal. I.e. back up your claims with evidence. This question intentionally doesn't constrain the sought examples to any one specific language. What I'm seeking here is a bigger-picture view.

Another title for this question might have been (sorry for any leading of the question here): "What overarching design strategies have contributed to the adoption of languages such as C++, TypeScript, Kotlin, and others?" (because I think they're mention-worthy examples of languages that have (to varying but significant degrees) succeeded in attaining those goals in those circumstances)
**Tags:** language-design
> **Comments:**
> **username_0**: related discussion on meta: https://languagedesign.meta.stackexchange.com/q/232/251  
> **username_0**: more related meta discussion: https://languagedesign.meta.stackexchange.com/q/235/251  
---
## 2 answers
### Answer by username_0 on 2023-05-19. Score: 8
Attribution: This answer presents the ideas of Herb Sutter, based on [his talk at cpponsea 2020, "*How to answer "why will yours succeed, when X, Y, and Z have failed?"*"](https://youtu.be/BF3qw1ObUyo). I've tried to elaborate by adding some additional examples.

The overarching strategies Herb presents are value, availability, and compatibility (with focus on compatibility), where the points made about value and availability are deeply connected to the point about compatibility.

These points are presented from an analysis of common design strategies of the languages that came into problem/application-domains with pre-existing, well-established languages, and which survived, going on to achieve usage-levels of comparable scale to the languages which came before them.

### Strategy 1: Value by-Design

This strategy is about answering the question "why would anyone want to go from the language they're using to this new language?"

To do that, you need to make a distinct, articulable new value proposition (like making an elevator pitch), and the easiest way to do that is to address existing/known pain points with already-adopted languages that already resonate with people and are well-understood- not just solving the same problems in the shared problem/application-domain, but also problems in existing solutions. For example (note: I find some statements in these "elevator pitches" subjective, but have left them as-is intentionally):

* From [the ISO C++ wiki](https://isocpp.org/wiki/faq/c#c-diffs): C++ is C with stronger type-checking (addressing pain-points with C's type system), wider support for different programming styles (but still including those of C, while allowing you to program "closer to the problem domain than the solution domain"), and more notational support without loss of efficiency (this isn't a pain-point for all C users, but it is to some), and support for data abstraction, object-oriented-programming, resource management, and generic programming (addressing pain-points related to a (relatively speaking) lack of those features in C). That's in terms of features. In terms of the problem/application-domain, from [the ISO C++ wiki's section on why C++ was invented](https://isocpp.org/wiki/faq/big-picture#why-invented) states: "*Stroustrup wanted to write efficient systems programs in the styles encouraged by Simula67. [...] The more general aim was to design a language in which developers could write programs that were both efficient and elegant. Many languages force you to choose between those two alternatives.*"
* From [TypeScript's website](https://www.typescriptlang.org/): "*TypeScript is JavaScript with syntax for types.*" (you can guess what the pain-point is) . See also [the design goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals), which include: "*Statically identify constructs that are likely to be errors.*" and "*Provide a structuring mechanism for larger pieces of code.*"
* From Kotlin's Getting Started docs: "*Kotlin is a modern but already mature programming language aimed to make developers happier. It's concise, safe, interoperable with Java and other languages, and provides many ways to reuse code between multiple platforms for productive programming.*" (Ex. pain-points with concision in Java)

There are at least two pitfalls with designing value propositions for a new language:

* To underestimate the value of of existing languages and code written in them. What a designer of a new language might call "legacy / old / complex" in an existing language is what a programmer in that language might as equally likely call "proven / working / robust (with flaws)"
* To underestimate the cost of parity: having already built something in one language, and then having to spend what it takes to build that again in a new language while achieving similar feature, performance, and stability (and often having to continue to support the previous version).

### Strategy 2: Availability by-Design

This strategy is about answering the question "how do I make the value of this new language available to users of existing languages in this space?"

The "Holy Grail" of this aspect of strategy is to be able to achieve a solution where users of well-established languages in the same problem/application-domain can easily add code in your new language to their existing projects written in the existing languages.

This can be seen in the following technologies (and bleeds into the next section's point on the strategy of compatibility):

* From [the ISO C++ wiki's section: "Is C a subset of C++?"](https://isocpp.org/wiki/faq/c#is-c-a-subset): "*C++ supports every programming technique supported by C95 (C90 plus an Amendment) and earlier. Every such C program can be written in essentially the same way in C++ with the same run-time and space efficiency. It is not uncommon to be able to convert tens of thousands of lines of ANSI C to C-style C++ in a few hours.*" See also [the ISO C++ wiki's FAQ, "Is C++ backward compatible with ANSI/ISO C?"](https://isocpp.org/wiki/faq/big-picture#back-compat-with-c) (TL;DR "*Almost*")
* Cfront (tooling): A compiler that compiled C++ to C. It was therefore available for use with (compatible with) with any C tooling.
* TypeScript: You can see availability written into [the design goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals): "*Preserve runtime behavior of all JavaScript code.*", "*Use a consistent, fully erasable, structural type system.*", and "*Be a cross-platform development tool.*"
* Some Kotlin-related tools have features to translate Java code into Kotlin code (Ex. JetBrains IDEs). Kotlin can be compiled to Java bytecode (that's not particularly interesting, since [a lot of other languages do too](https://en.wikipedia.org/wiki/List_of_JVM_languages), but I find it noteworthy here).
* (tooling): Swift is available to developers through Xcode on any Objective-C-supported platform.
* (tooling): Rosyln C# compiler is available to developers through Visual Studio on Visual C#-supported platforms.

### Strategy 3: Compatibility by-Design

Look at an adoption function as relating value as a function of effort. Would you as a user prefer an adoption function like a single-step step function (where all of the effort needs to happen all at once and you go from zero to 100% of the value), or an adoption function like a linear function (where you can put in the effort gradually and reap the value in proportion to the effort you have put in so far)?

Herb presents a minimum bar that code written in the new language should be able to seamlessly use code from the existing language (/languages)- whether through source or binary compatibility (Ex. FFI, byptecode, etc.). Ideally it would be seamless both ways, but old-to-new should be seamless at a minimum.

The "Holy Grail" of this design strategy would be that it take zero-effort to go from the existing language to the new language.

The examples given in the "Availability by Design" section also make sense here. In addition:

* Any C++ code can call C code (see also [the ISO C++ wiki's page on "How to mix C and C++"](https://isocpp.org/wiki/faq/mixing-c-and-cpp)). In the 1980's (no longer true for newer C++ language versions, but still "largely true"), you could give C source code to a C++ compiler and it would compile and give the same behaviour.

  Quoting from a review of D&E by Al Stevens written for Dr. Dobb's Journal, August 1994 (you can find a snippet of it [here](https://stroustrup.com/dne.html)):

  > [Stroustrup] could have assigned less importance to compatibility with C. "Within C++, there is a much smaller and cleaner language struggling to get out," which he says "would ... have been an unimportant cult language." Second, he is committed to the concept of static (as opposed to dynamic) type checking as being inherently safer and essential to retain the efficiency of C. Without that guarantee, programmers used to C's efficiency will not switch to a new language no matter what promise it holds.
* Any valid JavaScript code is valid TypeScript code (and you can already start getting some of the benefit of the TypeScript compiler's static analysis with almost no effort). Also in [TypeScript's design goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals): "*Impose no runtime overhead on emitted programs.*", "*Emit clean, idiomatic, recognizable JavaScript code.*", "*Align with current and future ECMAScript proposals.*" (a degree of forward compatibility with future JS), "*Do not cause substantial breaking changes from TypeScript 1.0.*" (a degree of self-backward compatibility between major versions).
* From SASS's ["Basics" documentation page](https://sass-lang.com/guide): "*Sass has two syntaxes! The SCSS syntax (.scss) is used most commonly. It's a superset of CSS, which means all valid CSS is also valid SCSS.*"
* Swift has very good bi-directional compatibility with Objective-C. They can call into each other, Objective-C object-layout and reference-counted-lifetime models are the same in Swift, and tooling support can do bridging header generation and view Object-C code as equivalent Swift code.

In those examples, compatibility came at costs- whether in implementation or in costs of holding on to *some* problems from existing languages, but it was deemed worthwhile to achieve the desired levels of adoption.

Some "counterexamples":

* Dart didn't achieve high compatibility with JS from the start, and it's still working on it in at the time of this writing: <https://github.com/dart-lang/sdk/issues/35084>.
* Borland Delphi did very well with designing for value and availability, and achieved compatibility at the start, but couldn't maintain it (difficult due to Borland being a separate company from Microsoft, which led to Borland always being behind the latest platform features).
* Python 3 is source incompatible with Python 2, and requires a mix of tool-assisted and manual migration (see also <https://docs.python.org/3/howto/pyporting.html>). And even nine years after Python 3 was released in 2008, a study showed that a significant amount of (purportedly most) code was still using a mix of Python 2 and 3 ([source](https://ieeexplore.ieee.org/document/8170118)), and even though Python 2 was officially frozen and unsupported in 2020, [the JetBrains developer survey of October 2019 found that](https://www.jetbrains.com/lp/python-developers-survey-2019/#PythonVersions) only 90% of respondents were using Python 3.
* C++11's ABI break banning reference-counting for `std::string`. GCC implemented the conforming implementation in 2015 with version 5.1, and adoption of that took years. The feature was disabled by default on Red Hat Linux's GCC 8 until 2019.

There's a pattern in the above examples: historically, it has often taken ~10 years to adopt new things without a strong compatibility bridge. The lesson being- if you want to do something that isn't compatible with well-established solutions in the problem/application-space and you have a good value proposition, don't be surprised if adoption to "well-established" levels takes something on the order of 10 years / an extra 10 years.

Some other compatibility-related pitfalls given the stated goals include (at [41:39](https://youtu.be/BF3qw1ObUyo?t=2499)): function "colouring" (dialect bifurcation) and the same code meaning different things to different but largely languages or language versions.

---

Another interesting note (but probably better left to another Q&A): these newer languages sometimes influence the existing languages:

* For C and C++, see also <https://en.cppreference.com/w/c/23> and <https://thephd.dev/c23-is-coming-here-is-what-is-on-the-menu>.
* For JavaScript and TypeScript, see <https://github.com/tc39/proposal-type-annotations>.
> **Comments:**
> **username_0** (2023-05-19): feel free to suggest additional examples either by suggesting edits or by commenting. Either way, please provide evidence to back up the info (Ex. links to more or less "official" (from the mouths of the maintainers) writings as I have done).  
> **username_1** (2023-11-05): Kotlin is notable for having very high interoperability with Java (unlike, for example, Scala), having made it a design point. Java code is easily usable from Kotlin and the Kotlin team tries to make sure you can use as much Kotlin code from Java as possible. I often have projects where Java and Kotlin code are mixed in the same project.  
---
### Answer by username_2 on 2023-05-20. Score: 2
When developing a new language, existing languages which have built up stability and community will always have the advantage. So you really need a way to make your language worthwhile.

Here is what Rust, Kotlin, TypeScript, and Swift (all languages which have superseded others in their domain) have done.

# Significantly improve upon the competition

You can't just fix one small problem and expect others to prefer your language. Rust's greatest strengths are C++'s greatest weaknesses: easy package management, safe memory-management, sensible generics, actual "Algebraic Data Types". Also, any of these features *alone* wouldn't have given Rust the widespread adoption it has today: a C++-like with strict safety guarantees would probably get adopted by safety-critical, performance-critical programs, but it would never reach mainstream adoption or adoption anywhere near C++'s numbers. Swift also out-done Objective-C with better performance *and* modern language design, and Kotlin out-done Java with less verbosity and footguns; but even these languages needed more than improvements alone to gain popularity...

# Industry support

Rust was developed with the help of Mozilla, Swift was developed by Apple, Kotlin was developed by JetBrains, and TypeScript was developed by Microsoft. A random nobody, or even a super-talented developer whose famous but only in the inner tech circles, will have a much harder time building up their language's community. And community is what makes or breaks a language, as technology keeps evolving: you need community to provide the utility libraries, resources, and platform support necessary for your language to become usable (and therefore get even more community). Industries also have the ability to make their language the default in their other products and platforms: Swift was created to be the main language for macOS and iOS, and Kotlin only really became popular once it became the main language for Android.

# Integration with existing tooling

This is where TypeScript in particular shines: not only can TypeScript code import JavaScript code and vice versa, not only does it compile to JavaScript, but TypeScript compiles to *readable* JavaScript and thus can even be used by JavaScript debuggers (when sourcemap fails, but this happens suprisingly often). Swift has interop with Objective-C, Kotlin has interop with Java and can target every JVM, and Rust has interop with C++.

# It takes time and stabilization

None of these languages were popular when officially released, and even today, there are many projects which would clearly benefit from them but have yet to migrate. Before it becomes popular, a language needs to stabilize: nobody wants to use a new language only to have to throw out their code because of massive API-breaking changes (which often happened in before Rust 1.0 and Swift 3, or was it 4?) A language also needs to become reliable: nobody wants to use a buggy language, and even with ample testing and good practices a new language is practically guaranteed to have *many* bugs (even Rust and Kotlin still have some bugs today). And even if the language itself is perfect, it needs community resources and packages, developer training, and a general sign that it and its community is here to stay. Ultimately, many of these languages took *years* of development before they became remotely mainstream; developing a new language is a long-term effort.
> **Comments:**
> **username_0** (2023-05-20): hm. While important, I'm not sure if "Industry support" is really a _design strategy_. See also the question post's constraints, which states: "_This is a question about overarching strategies for the stated goal- not about things like the language design team having enough funding, having good teamwork, quality of "product", rollout, or investment in marketing._"  
> **username_0** (2023-05-20): note: the rest of what you've written largely seems to be related to or repeating Herb's points in his cpponsea talk (which I've used in my answer post).  
> **username_0** (2023-05-20): to elaborate, your "_Significantly improve upon the competition_" sectionreally only adds the rust example to Herb's point about "value by-design", your "_Integration with existing tooling_" section is just a subset of Herb's points (and my extended examples) about availability by-design and compatibility by-design, and your "_It takes time and stabilization_" section is strongly related (a subset of?) Herb's side-point on the consequences of not having a good compatibility by-design strategy.  
---
