CommunityNews

CommunityNews

What a better rust would look like

What a better Rust would look like.
The Hare programming language was announced a few days ago, and, at first glance, its syntax looks similar to Rust. So, why would people bother to create a new language which aims to fulfill the same niche as Rust (system programming), with a similar syntax? Rust is often described by

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Most Liked

OvermindDL1

OvermindDL1

Yeeeeaaaah, HN, reddit, and unending IRC and Discord and Forum servers have utterly ripped this article apart… I’ll do a quick summarization:

In 2022, a standard library should at least contain the following packages:

DearGodNo! In short by making those things in the standard library means you are no longer able to iterate and advance on it, the API is then stuck forever more if you care about backwards compatibility at all, in addition no single instantiation of those is acceptable for all purposes, this is utterly inane to even suggest.

I don’t like centralized package repositories. They add complexity and obfuscation, all while supply chain attacks are increasing.

A useful ecosystem is useful, in addition you are not beholden to crates.io at all, you can make your own package server (even import things from crates.io or others into it statically), or vendor things in (cargo can even do that for you), or a variety of other things. But having a good default is good.

Forcing people to, as the article says, follow the Go model: centralized discovery but decentralized distribution is horrible from a maintenance standpoint because depending on a random git repo can suddenly vanish, has no reliability in long term availability, etc… etc… And that’s not even mentioning the other horrors of the go model that it didn’t even scratch on.

Due to how modules and packages work in Rust, I create dependency cycles more often than with some other languages.

…it’s not possible to have dependency cycles in rust, soooo… wut?

I think that Go got it right: modules are scoped by folder instead of files.

Yeah… modules are scoped by filename, so you actually can know what file something you are requesting from without needing to jump all over the place.

Again, I think that Go nailed it: Using the case (lowercase for private, uppercase for public) of the first letter of the identifier is perfect for lazy developers like me.

AnotherGoodFreakingGod, no, doesn’t matter if erlang does it or go does it, specializing visible by initial-case is stupid, just outright. First of all in go something is either public or private, there’s no other visibility modifiers (of which rust has many).

Yet, I don’t think that lexical lifetimes are the answer.

I’m far from an expert in this field, still, from a programmer’s perspective, I would love to see a mix of compile-time lifetime analysis, Automatic Reference Counting (like in the lobster programming language), and manual memory management (marked as unsafe) when extreme performance is needed. How to solve leaks due to cycles? I’m not sure.

But I’m sure that I no longer want to see lifetime annotations pollute our code ever :slight_smile:

At least the person mentions they are not an expert in this because it’s obvious they’ve never had to deal with long lasting system maintenance. And they seem to do the very what-on-earth thing that a lot of people who don’t seem to know much in thinking that ownership is for handling memory, it’s not, it’s for handling all resources, which yes includes memory but that’s a surprisingly small amount of what it manages, of which in go you still have to manage all that stuff manually still, the only thing go does is handle memory via a (very poor) GC, no other resource.

Thus features only accumulate, and complexity compounds over time.

Which is why rust has every-3-year versions that actively deprecate and add things in a backwards incompatible way, with an auto-migration tool included with the compiler system.

Governance

Related to features bloat: Who is in charge of refusing new features added to the language to avoid its collapse?

That would indeed be the Rust Governance Committee, which is one of the most well set up of any language anywhere with a very well set process.


Among lots of other… interesting things people have said. This article is exceedingly obviously made by someone who does not have long term work in maintainability of backend services in the industry.

chikega

chikega

So many new systems level programming languages ( Zig, Odin , Vlang, Nim, Hare), so little time. :cowboy_hat_face:

faust

faust

I guess the author just likes Go and can’t stand the idea of another language being better :sweat_smile:

Where Next?

Popular Backend topics Top

New
New
CommunityNews
A new study looks into the dematerialized office, where sensorial experiences such as touch, taste, smell, and sensations of hot or cold ...
New
First poster: bot
This blog post walks you through how to implement a time-series database engine based on what I’ve learned from my experience of writing ...
New
First poster: bot
Metaprogramming in Nim #1 Introduction. In this video i will show you and teach you about Nim’s Metaprogramming features/capabilities. E...
New
CommunityNews
Multicore OCaml by kayceesrk · Pull Request #10831 · ocaml/ocaml. This PR adds support for shared-memory parallelism through domains and...
New
First poster: bot
Writing a Game Boy Emulator in OCaml. For the past few months, I have been working on a project called CAMLBOY, a Game Boy emulator that...
New
First poster: bot
IS C++ DOOMED?. I was bored so wrote a contiguous queue in C++ ( ). These are my thoughts from that exercise. INTRO I’ve written a lot o...
New
First poster: bot
GitHub - WhatsApp/waraft: An Erlang implementation of RAFT from WhatsApp. An Erlang implementation of RAFT from WhatsApp. Contribute to ...
New
First poster: bot
Perfecting WebGPU/Dawn native graphics for Zig. A 700+ commit complete rewrite of mach/gpu (the WebGPU interface for Zig) has been compl...
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1142 25765 758
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New