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 exactly is "a Ruby like syntax", and to what extent doesn't Rust cut it?

@berkes it's kind of self-explanatory. It would be a syntax that is similar to Ruby, as opposed to being C-like.

- Screenshots 1, 2 and 4: Elixir, (the power of Erlang but with Ruby-like syntax).
- Screenshot 3: Crystal (a low level language, but Ruby flavored).

I.e.:
- No ; and no {} blocks
- snake_case
- Favor expressiveness
- Favor clarity (so no &, *, <> everywhere)

@alfredbaudisch all those languages "lack" features though. No type constraints, no borrowing/memory fiddling.
Scoping and closures aren't controllable.

So a lot of the "clarity" seems to come from "not having these features".

Sure, rust-ish could have do-end instead of {}, remove ;, or have unless or even postfix "if". but does that really make a big difference? Is that what makes Ruby, Crystal or Elixir more readable?

Or is it the memory model, omission of types and features?

@berkes
> Is that what makes Ruby, Crystal or Elixir more readable?

Yes, keeping as close to English as possible is what makes those languages more pleasing to the eyes.

The simple removal of ";" and "{}" do great work already.

> all those languages "lack" features though.

Ruby? Sure. But Elixir? Elixir is not the fastest language out there, but it has processes, supervisors, distribution, self-healing and more out of the box, while being Ruby-like!

@berkes but then Elixir is not meant for Desktop applications, so that's why I'm seeking other alternatives. Otherwise, I'd also stick with Elixir for that.

My intended usage would fit Elixir processes perfectly, i.e. 100s of thousands of parallel, self-contained and isolated individual entities with a background of culture and needs evolving in real-time - this is a breeze AND REALLY EASY to do with Elixir (and safe for being immutable).

@alfredbaudisch maybe that's more the actors pattern than language syntax?

In rust, there's actix, tokio-rs, riker or any of the many actors libs that offer the same. 3rd party, so not as available as in elixir, but the outcome is the same.

I love the actor pattern. Used it in Ruby (w celluloid), Go, Rust and Erlang. Erlang's is the most natural, and mature, but still a bit of a leaky abstraction.

@berkes I know the Elixir stuff is not because of syntax, I cited them because you said "they are Ruby-like but maybe they lack features" - yes they lack low level memory management et all, but definitely then you have all that other pros (in Elixir the Erlang VM and OTP and the Actor model for "free", etc).

Anyway thanks for the tokio recommendation. I'll experiment with it this week - seems right up my alley :)

@alfredbaudisch I've dabbled with actix, tokio-rs, a DIY actor system (not too hard) and Riker.

Riker is, by far, my favorite. Best documentation, simple and complete. Main downside is that it appears abandoned. Last commit over 2y ago๐Ÿ˜ฑ.

If you find anything better, please let me know:)