Source: https://www.adservio.fr/post/rust-based-tools-for-more-sustainable-devops-adservio

Rust As Application Programming Language

Hiraq Citra M
lifefunk
Published in
3 min readJul 28, 2024

--

Overview

Many opinions about this programming language, and many of them say that this language is a system programming language.

systems programming aims to produce software and software platforms that provide services to other software, are performance-constrained

Source:

Application Programming Language

What is the application programming? Taken from the same source above:

application programming aims to produce software which provides services to the user directly

Imagine an application like:

  • CRM
  • CMS
  • Social network
  • etc…

An application that will be used by end users. Before this language comes, there are other choices of programming languages aimed at building an application, such as:

  • Python
  • Ruby
  • JVM-based languages (Java, Scala, Kotlin)
  • Golang

Choose the programming language to build an application, based on my experiences requires two important parameters:

  • Productivity
  • Expressiveness

Productivity

The software application is very tightly coupled with the business context. It needs to be able to move faster and also flexible at the same time. It needs to always iterate to fulfill business requirements that will always be changed from time to time.

I’ve heard many people have opinions that it is almost impossible to be productive in building systems or applications using Rust, due to extremely high learning curves. Well, I think it depends.

It took me around 6 months to 1 year to learn Rust, but after facing many struggles (and I have to admit that), in the end, I can work using Rust and be productive.

It depends on your definition of productive

If the definition of productive means, you need to learn this language as your new language but at the same time you also need to deliver some of the application’s features, then yeah, maybe you’re right, that choosing this language may be a wrong choice, and I think that it just brings the chaos.

But if the definition of productive means you can build the base foundation for your application including modeling your business domain problems, and the most important thing you already have experience working with this language, then choosing this language is the right decision.

If using this language can solve one of your specific problems, then I think it’s really worth trying.

Expressiveness

Expressiveness for me means the ability to make a model of something, for it relates to domain modeling.

How expressive is the language in modeling a domain

In my personal opinion, this thing is really important. It doesn’t matter how fast the compiled binary is executed in the runtime, but if its language is not expressive enough, it will be hard for us as software engineers to build the application (unless you don’t care at all about this thing).

Before Rust, there were some languages that I think were good enough for modeling a domain:

  • Microsoft stacks languages (C#, F#)
  • JVM-based languages (Java, Scala, Kotlin)

All of these languages are really great for modeling domains, they’re really expressive according to my opinion, but they come with their own price, such as for the performance bottleneck. And that’s why I am happy when Rust comes.

With Rust, now I have a language that is expressive and without any performance penalty. It gives us a real zero-cost abstraction, and it’s really important when we model a domain.

What does the zero-cost abstraction mean? Through this principle, an engineer is able to write a high-level abstraction, without any runtime costs, only the compile-time cost. The result is, that the developer is able to express a complex domain problem, without sacrificing any runtime performance.

With Rust, we’ve got the expressiveness of C#, F#, or Java/Scala, but with the performance of C/C++

Outro

So the conclusion is, that I think it’s worth it to use Rust as application programming, like what I’ve tried to explain especially for its expressiveness.

The first time, I felt “embarrassed” to use this language to build an application, because, in almost all articles/references that talked about Rust, 99% were always talking about the performance-sensitive system, but after learning, researching, and experimenting with using this language, my self-confidence is increasing and more confident to use it.

--

--