this post was submitted on 11 Jan 2024
34 points (87.0% liked)

Rust

5943 readers
2 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
34
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 

Almost five years ago, Saoirse "boats" wrote "Notes on a smaller Rust", and a year after that, revisited the idea.

The basic idea is a language that is highly inspired by Rust but doesn't have the strict constraint of being a "systems" language in the vein of C and C++; in particular, it can have a nontrivial (or "thick") runtime and doesn't need to limit itself to "zero-cost" abstractions.

What languages are being designed that fit this description? I've seen a few scripting languages written in Rust on GitHub, but none of them have been very active. I also recently learned about Hylo, which does have some ideas that I think are promising, but it seems too syntactically alien to really be a "smaller Rust."

Edit to add: I think Graydon Hoare's post about language design choices he would have preferred for Rust also sheds some light on the kind of things a hypothetical "Rust-like but not Rust" language could do differently: https://graydon2.dreamwidth.org/307291.html

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 9 months ago (1 children)

"Faster/easier/less mental overhead" is indeed exactly what I mean by "convenient".

Maintainability is very different from "convenience", and I think we're both in agreement that Rust makes the correct tradeoff by favoring maintainability over convenience. But that doesn't mean that maintainability implies convenience!

I strongly prefer to write Rust versus "convenient" languages such as Python, Ruby, and (my least favorite, but the one I use most often professionally) Go. But that doesn't stop me from appreciating the benefits of "convenience"; and I think that there is room in the language design space for a slightly different tradeoff: something that isn't usable everywhere Rust is (e.g. it presumably wouldn't ever be a candidate for inclusion in the Linux kernel) but still has many of the same maintainability advantages.

[–] [email protected] 1 points 9 months ago (1 children)

“Faster/easier/less mental overhead” is indeed exactly what I mean by “convenient”.

How different the conception of convenient is :P

I think it's super convenient to just do cargo new , start hacking, have superb tooling/expressiveness/performance etc. And it works remarkably well and fast if the problem space is not self-referential etc. or a lot of mutability is in play (I'm probably faster in Rust now than in python, but that probably has to do with the amount of time I'm spending with it...). But I get your point, and I think there's certainly better languages for certain problems (and I even started one myself some time ago, because I wanted something like Nix but with strong typing (anonymous sum/union types/sets etc. similar as typescript))

[–] [email protected] 1 points 9 months ago (1 children)

You agree with me so strongly that you started designing your own language?? Then why didn't you lead with that, since the post was asking for neolang recommendations??

[–] [email protected] 1 points 9 months ago

Well the project never left its roots, it's a still a simple system-f implementation, and a lot of ideas. I've put it on ice, after seeing how much involved there is with questionable outcome (and I need to dedicate a good amount of time to get the theory right, it's not that I have year long research experience background in type-theory etc.). There's more concrete problems than designing yet another language... Maybe I'll come back to that project at some time.

Anyway the idea was to have something like Nix but more general (including derivations, possibly controlled side-effects). Closest to that currently would be typescripts object type, Haskell (overall static typing), crystal-langs union type and nickel (which is less ambitious (probably for good reason)).