The Rustacean Principles are more than feel-good ideas. They are a key part of why developers keep giving Rust the crown.

channel asia, australian reseller news, arn, channel x, australian channel, the channel, it channel, reseller, it distribution, idg, information technology, it, partner, assembler, systems integrator, applications developer, software developer, xsp, service provider, web developer, asp, isp, supply chain, it services

Credit: Gratisography

Despite its name, the Rust programming language has never looked so shiny and new. Way back in 2016, Stack Overflow’s annual survey of developers crowned Rust the “most loved” programming language. They voted their love again in 2017, 2018, 2019, 2020, and 2021. Presumably, when 2022 rolls around, that devotion to Rust will persist.

Not that the Rust community is resting on its laurels. No, if anything, Niko Matsakis, co-lead of the Rust programming language project; Shane Miller, chair of the Rust Foundation; and other key members of the Rust community are working hard to ensure Rust will remain beloved for years, even decades. One way they’re doing this is through the Rustacean Principles.

Although the Rustacean Principles could be dismissed as mottos to be casually discarded whenever fluffy ideals meet brutal reality, they actually function as robust guides to Rust’s long-term development.

Principled behaviour for Rust

Given that Matsakis and Miller both work at AWS, it’s not surprising that the principles started out as a spin on Amazonian tenets. Amazon uses tenets to guide decision making. In the case of Rust, Matsakis and crew may have started with Amazon-esque ideas, but they’ve since evolved them to keep the Rust community on course to empower “everyone to build reliable and efficient software.”

What are these principles? In building Rust, its community balances different, mostly complementary, principles of what Rust should be:

  • “Reliable: If it compiles, it works.”
  • “Performant: Idiomatic code runs efficiently.”
  • “Supportive: The language, tools, and community are here to help.”
  • “Productive: A little effort does a lot of work.”
  • “Transparent: You can predict and control low-level details.”
  • “Versatile: You can do anything with Rust.”

I said the principles are “mostly complementary” because, as Matsakis points out, “These properties are frequently in tension with one another.” What happens when making Rust reliable conflicts with making it perform well? When two principles conflict, he notes, “We tend to give the edge to those goals that come earlier in the list over those that come later.” Reliability, in other words, is more important than versatility. Even so, “while the ordering is important, it’s important to emphasise that for Rust to be successful we need to achieve all of these feelings at once.”

For those looking to the future of Rust (currently at Version 1.54, but evolving fast), the list and its order of principles offer a great guide for what to expect from the Rust community going forward. It’s perhaps worth looking at a specific example to see how this plays out in practice.

You’re so reliable

As detailed in the principles, Rust’s reliability is “most often at odds with making Rust feel productive and supportive.” Why? Because Rust relies on cross-checking across the system to ensure overall consistency. This principle ensures developers can invest great confidence in systems built with Rust, but it does come at the expense of other principles. A great example of how the community grappled with the balancing of different principles is described in the write-up of the eventual adoption of the “Truncate at Drop unless Copy” rule.

How do Rustaceans build reliability into Rust? In two primary ways.

First, Rust relies on Type safety. This means that “Rust code is free of ‘undefined behavior,’ which is the term that compiler authors use to refer to things like segfaults, data races, and out-of-bounds memory accesses.” Rust’s community will never accept “almost safe” APIs. It’s not good enough that the code works so long as everyone does rational, reasonable things. The code has to work. Because this can grate against the principle of productivity, Rust works hard to deliver informative documentation and error messages to try to mitigate the potential to burden other Rustacean development principles.

The second way Rust helps deliver reliability is by consideration of all cases. What does this mean? “Rust doesn’t hide error conditions and encourages listing all possibilities explicitly (or acknowledging that something is elided).” Here’s how Rust accomplishes this sub-principle:

“Rust...adopts the approach pioneered in functional languages of returning an enum. The Result enum allows one to signal an error in a way that forces the error to be considered. Still, the most common way to handle an error is to propagate it to your caller, and in order to feel productive, it’s important that this operation be concise. Rust’s ? operator was added to restore productivity while ensuring that error paths are still visible to users and are not completely overlooked.”

As may be evident, things like great error messages aren’t really a function of the language itself, but rather of community behavior that helps ensure overall reliability for Rust. Some of these principles are expressed in code, in other words, while others are delivered through community behavior. As such, it’s perhaps not surprising that the Rustacean Principles outlined by the Rust community also include a section on “how to [be] Rustacean”:

  • ”Be kind and considerate”
  • ”Bring joy to the user”
  • ”Show up”
  • ”Recognise others’ knowledge”
  • ”Start somewhere”
  • ”Follow through”
  • ”Pay it forward”
  • ”Trust and delegate”

Rust has succeeded, in significant part, because its community has not been willing to sacrifice the central tenets of what Rust means. As Oso CTO Sam Scott once told me, Rust is “systems programming with guardrails.” Those guardrails turn out to be critical for Rust development and adoption. They’re preserved by the Rustacean Principles and point the way to what Rust will look like in the future, even as it evolves.

Latest breaking 24h news around the world Latest breaking 24h news around the world - Page 2 Latest breaking 24h news around the world - Page 3



Microsoft's redesigned Surface Pro 8 sets the new bar for Windows tablets

Microsoft's Surface Pro 7+ is a best-in-class Windows tablet, and the new Surface Pro 8 includes several welcome improvements.

Read more: Microsoft's redesigned Surface Pro 8 sets the new bar for Windows tablets

Eclipse's Jakarta EE gains momentum

Developer survey by the open source foundation finds nearly half of respondents will migrate to Jakarta within two years.

Read more: Eclipse's Jakarta EE gains momentum

What to expect from SASE certifications

Free and fee-based SASE certifications are cropping up from vendors including Cato Networks, Netskope and Versa Networks. Are they worth the effort?

Read more: What to expect from SASE certifications

Deno 1.14 extends Web Crypto API

Latest update to the Node.js rival also stabilises the WebSocket API, introduces file locking APIs, and updates the Deno extension for Visual Studio Code.

Read more: Deno 1.14 extends Web Crypto API

Windows 11: Just say no

In a few weeks, Windows 11 will arrive. Should you upgrade to it? Let me answer with a question: "Should you stop hitting your head against the wall?"

Read more: Windows 11: Just say no

DataStax offers serverless, NoSQL Astra DB across multiple regions, clouds

DataStax's move to make its Astra DB database as a service (DaaS) available in multiple public cloud regions globally helps set it apart from other serverless offerings.

Read more: DataStax offers serverless, NoSQL Astra DB across multiple regions, clouds

8 top cloud security certifications

Cloud security skills are in high demand. These certs will help you demonstrate your cloud security know-how.

Read more: 8 top cloud security certifications

Palo Alto shapes integrated SASE package for hybrid enterprises

Palo Alto’s Prisma SASE brings together the company’s its core Prisma Access package with the company’s SD-WAN technology

Read more: Palo Alto shapes integrated SASE package for hybrid enterprises

Cisco forecasts a bright future for network, app, hybrid work technologies

Python slithers toward top of language popularity index

Google Flutter 2.5 UI kit is now stable

All the little iPhone 13 details you may have missed

Brace yourselves: Windows 11 may have more popups

Mendix low-code PaaS adds Industry Clouds for key business sectors

Windows 11 won't support Apple's M1 Macs, but you might be able to run it

Russia is fully capable of shutting down cybercrime