Programming Language Landscape

Programming Language Landscape

0
511

Written by POT and Levi

1. Programming Language Categorization

1.1 Based on the complexity of the programming language

  • High(er)-level programming languages: These languages are closer to human language and are designed with extensive libraries that contain pre-implemented functions, reducing the need for developers to write everything from scratch.
  • Low(er)-level programming languages: These languages are closer to machine language, requiring developers to manage memory and perform more low-level operations. Example: In C++, developers need to work with pointers to manage memory, which can be complex and error-prone.

1.2 Based on the capabilities of programming languages (in the context of developing smart contracts)

  • Smart contract language: can be used to write smart contracts with the help of certain supporting tools, commonly used for Web3 Example: Rust
  • Smart contract (pure) language: specifically designed to write smart contracts, hardly ever used outside of Web3 Example: Solidity, Vyper
  • Non-smart contract language: Python, Golang, etc.

đź’ˇ Fun fact:

  • List of popular programming languages

  • Common use case:
Source: jetbrains
Source: jetbrains
  • Solidity was specifically designed for coding smart contracts and serves a role similar to SQL in Web2. It is used to query information from databases on the blockchain and define the conditions of contracts, rather than being used to build virtual machine systems.
  • Virtual machine systems like EVM can be built using various programming languages.

Example: Clients running on the EVM virtual machine can be coded in Go, C++, and Rust.

  • Computer architecture, EVM architecture, and the languages used to build their components.
  • The stages of designing and executing a smart contract on a blockchain

Example: Geth can be utilized to establish connectivity with the Ethereum network. Subsequently, tools such as Truffle or Hardhat can be employed to compile your Solidity-written smart contract into bytecode, generate a transaction for deploying the contract, and transmit the transaction to the network via Geth. Geth will then undertake the task of disseminating the transaction across the network, where it will be validated, added to the blockchain, and ultimately conclude the deployment procedure.

  • There are programming languages that can be used to write smart contracts if they have their own compilers capable of translating source code into bytecode. However, accomplishing this requires time to develop the compiler tool and build trust (network effect) within the community.
  • What is a compiler?

2. The Popularity of Programming Languages

2.1. By the number of active developers

Source: Statista
Source: developerreport
  • In 2022, it is estimated that there were approximately 27 million professional engineers (developers) worldwide, of which only around 23,000 developers were active on Web3 platforms. This accounts for approximately 0.085% of the overall developer population.
  • The market share of smart contract (pure) languages (Web3) is significantly smaller compared to the other two categories. As a result, they do not currently rank among the top programming languages widely used by developers.
Source: SlashData
Source: HackerRank
  • According to SlashData’s data on the number of active developers in 2022, the following programming languages are among the most popular:
    • JavaScript: JavaScript is widely used for front-end and back-end web development, making it one of the most popular programming languages among developers.
    • Python: Python’s simplicity, versatility, and strong community support have contributed to its popularity. It is widely used in areas such as web development, data analysis, machine learning, and automation.
    • TypeScript: TypeScript, a typed superset of JavaScript, has gained popularity for its ability to provide static typing and enhanced tooling while maintaining compatibility with JavaScript. It is commonly used in large-scale web applications.
    • Java: Java, a versatile and widely adopted language, is used in various domains, including enterprise software development, Android app development, and server-side applications.
    These four languages are among the most widely used by developers based on their active developer count in 2022.
  • The growth rates of programming languages in 2022, as reported by HackerRank, varied significantly.
    • While the number of active developers using JavaScript remained high, its growth rate was comparatively slower compared to the overall market.
    • Furthermore, Golang and TypeScript experienced substantial growth in user adoption in 2022. Despite being relatively young languages, with Golang introduced in 2007 and TypeScript in 2012, they recorded significant growth rates of 125% and 182% respectively.

2.3. By Developer Interest Level

  • According to the PYPL Index (2023) (The Popularity of Programming Language Index, PYPL, is generated by analyzing the frequency of searches for programming language tutorials on Google.)
    • In recent years, the developer interest in newer programming languages such as Golang, Rust, and TypeScript has experienced remarkable growth.
Source: PYPL Index (chart logarithmic scale)
  • Based on the developer popularity survey (2023) conducted by StackOverflow:
    • Rust is considered the most loved programming language, with 87% of surveyed developers expressing their desire to continue using it. TypeScript follows closely with 73%, while Python and Golang are also highly favored with 67% and 65% respectively.
    • Solidity, a smart contract language, stands out as the only pure smart contract language in the provided data and has gained significant popularity among developers.
    • The smart contract languages listed in the data table below include Rust, TypeScript, and C++
Source: StackOverflow survey
  • According to the survey on the next programming language developers intend to learn, conducted by Future Processing:
    • Golang is the programming language that many developers expressed their interest in learning, followed by Python, Kotlin, TypeScript, R, Scala, Swift, Rust, and others.
    • Among the top 27 languages, only TypeScript, Rust, and Haskell are considered smart contract languages, and notably, there is no presence of pure smart contract languages in the list.

đź’ˇ Fun fact: Reasons for the popularity of Rust, TypeScript, and Golang:

  • Rust: Rust combines the memory optimization features of C++ with easier syntax, making it more approachable. It also prioritizes memory safety and provides better debugging capabilities, similar to the characteristics of Python.
    • Why is Rust loved?
  • TypeScript is based on JavaScript and offers numerous improvements over the language. JavaScript was already widely popular among developers before TypeScript came into the picture.
  • Golang: Golang, or Go, is known for its simplicity, efficiency, and strong support for concurrent programming. It offers fast compilation times, built-in garbage collection, and a strong standard library. Golang’s straightforward syntax and performance optimizations make it appealing for developing scalable and efficient applications.

2.4. By Ecosystem

(Only applicable to smart contract languages and smart contract (pure) languages)

Although there are no specific figures on the number of developers for each smart contract language, we can partially infer the popularity of programming languages from other indicators such as Total Value Locked (TVL) and monthly active developers for each chain.

  • Based on data on TVL breakdown by Smart Contract Languages, we can infer that Solidity is currently the dominant language in the Web3 space, followed by Vyper and Rust.
  • Similarly, based on data on monthly active developers for each chain, we can also infer that Solidity remains the dominant language in Web3, followed by Vyper and Rust.
Source: developerreport

Source: DefiLlama
Source: DefiLlama

3. Comparing the Demand for Programming Languages in Recruitment (by Geographic Region)

3.1. Salary Comparison

  • Solidity, Golang, and Rust are the top three programming languages that receive highest salaries.
  • The top three countries that offer high salaries for developers are the United States, Canada, and Australia.

3.2. According to job posts

  • According to devjobscanner, a tool that aggregates job posts from popular job portals such as LinkedIn, Glassdoor, and Dice, JavaScript, Python, and Java are the top three programming languages with the highest demand for recruitment.

4. The Adoption of Programming Languages in Educational Systems

4.1. Within Universities

  • According to quick social listening (Reddit, Quora, quick surveys, etc.), universities often introduce lower-level programming languages (i.e., languages that are closer to machine language) in their curriculum to help students understand principles rather than focusing on coding projects. These languages are commonly referred to as “educational programming languages”.
    • C-based: C, C++
    • Java-based: Javascript, Java
    • Lisp-based
    • Scala-based
  • However, currently, there is a trend where many universities are incorporating Python into their teaching curriculum due to its widespread popularity, ease of use, and high practicality.

4.2. Outside of Universities

  • External courses, in contrast to universities, typically prioritize practical skill development that meets the hiring requirements of businesses.
  • According to the data below, approximately 45% of professional developers acquire their programming language knowledge through universities, while the majority of them opt for self-study from external sources such as online courses, platforms, training programs, and bootcamps.
Source: hackerearth

Some popular online learning platforms:

YouTube is widely recognized as the most popular platform for self-improvement and skill development.

Source: StackOverflow surveys
Source: hackerearh

5. Developers’ Perspectives on Programming Languages in Web3 Space

5.1. Survey information

  • Method: In-depth interviews
  • Number of participants: 11 developers
  • Result

5.2. The current state

  • Solidity and Vyper (an upgraded version of Solidity) are two languages specifically created for the EVM (Ethereum Virtual Machine) and currently lead the field in Web3, specializing in writing smart contracts.
  • Rust is gradually gaining attention in the Web3 community, partly because Solana has chosen Rust as its primary programming language. Another reason is that Rust provides flexibility and safety in memory management while allowing programmers to utilize complex data structures without worrying about memory errors.
  • Other programming languages like Huff, Cairo, Move, and Typescript are also being used to write smart contracts, but they are not as popular as Solidity, Vyper, or Rust.
  • The current EVM’s improved performance and convenience are primarily due to the integration of the compiler into the chain. In contrast, non-EVM platforms require separate compilers for each language, resulting in slower speeds.
  • Comparing Rust and Solidity:
    • Solidity is similar to JavaScript and C++, while Rust is similar to C++ and Python, making both languages easily accessible to Web2 developers, especially IT students in universities. However, Rust is considered more difficult to learn compared to Solidity because it is low-level (although Rust is easier to learn than C++). It may take approximately 3-6 months to become proficient in Rust. However, once people become familiar with Rust, they tend to stick with it due to its convenience. Rust is also regarded as a multi-purpose language, suitable for both Web2 and Web3 development, as well as for programming smart contracts and system software.

5.3. Developers’ Future Projections

  • EVM will continue to maintain its dominant position in the medium term due to its maturity and security. Solidity will also remain the most popular language for writing smart contracts in Web3. Although Solidity is not yet a perfect language, it is constantly being improved and updated to become more efficient and reliable.
  • Some survey respondents also recognize the advantages of Rust. They believe that Rust will be a prominent name in the medium-term future alongside Solidity, but they do not believe that Rust will replace Solidity’s leading position in the Web3 field.
  • WebAssembly (WASM) is an emerging technology written in a complex, low-level language. It has been the subject of extensive research and is believed to hold significant long-term potential. However, its current limited adoption can be attributed to its complexity and relative novelty.

6. Multilanguage support

  • WebAssembly (Wasm) is a binary instruction format designed to enable flexible compilation of low-level languages such as C, C++, and Rust. It allows code to be executed in a low-level, efficient, and secure environment across various platforms, including web browsers. Wasm is a low-level language making it difficult to learn. Wasm is not specific to any particular blockchain or platform and can be used in different contexts. Wasm is still in its early stages of development, and it will take some time before it builds rich environment for developers.
    • Case study: Cosmos embraces WebAssembly (Wasm) and tailors it for the Cosmos chain, referred to as CosmWasm, which currently offers support Rust only.

💡 Fun fact: “It’s foolish to just throw those (EVM today’s standard virtual machine) away. But it’s not foolish to start thinking about where the next thing is, and that for me is using WebAssembly as smart contracts — Dr. Gavin Wood, founder of Polkadot/Kusama and Co-founder of Ethereum.” ⇒ Gavin Wood is also bullish about WebAssembly in the long term. 
  • The authors have identified three noteworthy projects from the year 2022: Versatus, 5ire, and Venom. However, it is important to note that this list is not exhaustive and may not include all relevant projects. While none of these projects utilize WebAssembly (Wasm), they all adopt a consistent strategy of not confining themselves to a single programming language, they share a common approach of not limiting themselves to just one language but supporting multiple languages for writing smart contracts on their respective blockchains.
    • Versatus, founded in 2020, builds a LibraryOS based on RISC-V that supports various languages such as JavaScript, TypeScript, Solidity, Rust, Move, Go, C, C++, and more.
    • 5ire, founded in 2021, is an EVM chain that supports Wasm, enabling support for Rust, C/C++, alongside Solidity and Vyper.
    • Venom, founded in 2020, although not an EVM, develops its own TVM (Threaded Virtual Machine) based on the EVM, supporting the Threaded Solidity language (an upgraded version of Solidity) and providing a Rust SDK to support Rust developers in writing smart contracts. It also has bindings for JS, Python, Go, Java and other popular languages. ⇒ Despite investing 2-3 years in product development, these three projects have not yet presented complete solutions ready for the mainnet launch. Notably, even CosmWasm, which debuted in 2019, currently only supports the Rust language. ⇒ It’s crucial to recognize that this circumstance isn’t solely attributable to the adoption of a multi-language support strategy. Nevertheless, it’s evident that a considerable amount of time has transpired.

7. Conclusion

  • Long-established languages like JavaScript, Java, and Python still hold the leading positions in terms of the number of developers. However, in the past five years, newer languages like Golang and Rust have gained more attention due to their ability to reconcile the strengths and weaknesses of older languages.
  • In the Web3 space (languages for coding smart contracts), overall, the market share of this group compared to specialized languages in Web2 is relatively small. Among them, Solidity (for EVM) is in the leading position. Programming languages like Huff, Cairo, Move, and Typescript are also used for writing smart contracts, but they are not as popular as Solidity, Vyper, or Rust.
  • Salaries for Solidity, Golang, and Rust are among the highest in all programming languages. Employers in the United States, Canada, and Australia offer high salaries to developers proficient in these languages.
  • The network effect of EVM and Solidity in the Web3 field is significant. EVM currently has high performance and faster speeds. Solidity has also gained a lot of trust from the developer community. Therefore, EVM and Solidity will continue to have an advantage in the Web3 space.
  • Rust is a multi-purpose language used in both Web2 and Web3 and can be used to program smart contracts as well as system software. Rust also has a lot of room for development in the Web3 field.
  • Although Wasm is complex, it has long-term potential. However, building custom Wasm for a specific chain requires significant time and resources. Therefore, Wasm is not yet ready for widespread adoption.
  • Developers’ opinions: Due to the steep learning curve, it is difficult for Rust to replace Solidity’s dominant position in the Web3 space.
  • Authors’ opinion: In the long run, chains that support writing smart contracts in multiple languages will have an advantage in attracting developers compared to other chains.

8. Limitations of the research article

There are two main restrictions that deserve attention within this research. To begin with, the number of participants in the survey is restricted, which could potentially affect the extent to which the findings can be applied to a broader context. Secondly, there is a lack of personnel with an IT background among those who were engaged in the study. This raises doubts about the precision of the viewpoints presented. These limitations underscore the importance of interpreting the study’s conclusions with care. We are open to receiving feedback if any of this is inaccurate.