I'm experimenting with #Rust again, and my eyes always bleed with the "lifetime annotation syntax" - why does it have to use an apostrophe 😩 .

&'a mut i32

fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {

impl<'a> System<'a> for LeftWalker {
type SystemData = (ReadStorage<'a, LeftMover>,
WriteStorage<'a, Position>);

But this time I'll try not to rage quit in digust again. I'll stick until this experiment ends. #rustlang

Another one:
- Generics in every language: Vector<MyType>()

- Rust:

Nope:
Vec<u32>::new();

This works:
Vec::<u32>::new();

And this ALSO works:
(Vec <u32)>::new();

So I can't use the universal language of: Vec<u32>::new();

But I can do (Vec <u32)>::new();

#Rust #rustlang

What kind of syntax is that? For the past 28yrs I used more than 12+ langs in every kind of project & the ugliest language I've seen is Rust.

Yes, EVEN UGLIER THAN ERLANG, at least Erlang is consistent and makes sense.

DREAM:
- Systems programming language w/ the safety of Rust
- a package manager
- the ecosystem/community size of Rust
- C/C++ tooling (debugger and LS)
- C/C++ interop
- ALL OF THAT with a Ruby-like syntax

The answer could be Crystal, but unfortunately it has a tiny tiny ecosystem and Windows is a 2nd class citizen and Crystal has probably the slowest compiler on Earth.

Nim is probably the answer (it's Pascal-like), but Nim loses on tooling.

Other suggestions?

#Nim #NimLang #Rust #RustLang

@alfredbaudisch What is the problem with the LS in Rust? Rust-Analyzer is from my experience much better than language servers for C++.

@mo8it oh no problem with Rust's LS.

The main point is that I want: "ALL OF THAT with a Ruby-like syntax"

@alfredbaudisch For me personally, although I had experience in C++, I did not like the syntax of Rust at the beginning. I wished a syntax like that of Python or Julia.

But this picture is the best description of my experience:

https://infosec.exchange/@AstraKernel/109628938569008449

After understanding more of the concepts behind the syntax (for example lifetimes etc.), I do appreciate the syntax. At the end, a statically typed general purpose language that can be used as a low level one can not look like Python or Ruby.

Astra Kernel :verified: (@[email protected])

Attached: 1 image #Rust #rustlang #rustaceans #rusties

Infosec Exchange

@mo8it
"a statically typed general purpose language that can be used as a low level one can not look like Python or Ruby."

Actually Crystal is exactly that: https://crystal-lang.org/

It even has C and C++ interop, but unfortunately it didn't take off.

Crystal is low level while looking almost identical to Ruby, being very beautiful and readable.

Unfortunately, the catch is that a simple "hello world" can take 30 seconds to compile.

Crystal

Crystal is a general-purpose, object-oriented programming language. With syntax inspired by Ruby, it’s a compiled language with static type-checking. Types are resolved by an advanced type inference algorithm.

The Crystal Programming Language