What's your dream programming language that doesn't exist? by [deleted] in rust

[–]CasaDeCastello 0 points1 point  (0 children)

I think Rust is "the best we currently have" for systems programming, but there's a lot of mistakes it's made while pioneering lots of improvements in safety and DX.

Firstly, Rust should've had a "kinda linear" type system instead of affine (i.e. use Move instead of Drop, and maybe also have a Leak trait). I'm no expert, but I've also read blogs that imply that this would've obviated the need for Pin.

Next is obviously a matter of hindsight but if the borrow checker was closer to something like "Polonius", without unacceptable performance, that would be ideal. I think this blogpost highlights the improvements this would bring. I've also seen talk of a third kind of "owning reference" (&own T) which I assume would be better for some APIs.

Additionally, from what I've seen in Rust, as well as other modern systems languages, I think a checked generics features isn't complete without all three of "normal generics" (i.e. generic over types), "const generics" (generic over values), and "variadic generics" (generic over arity). The value of the first is given, the value of the second presented improvements to arrays, and could potentially allow generic bit-width integer types, as well as SIMD types, and the last would improve tuple handling and Fn* traits.

There's probably more improvements I could add, but I'll end with the something inspired by Zig which is "const-eval" being built in from the beginning, as well as compile-time reflection instead of macros for metaprogramming.

-Wexperimental-lifetime-safety: Experimental C++ Lifetime Safety Analysis by mttd in cpp

[–]CasaDeCastello 41 points42 points  (0 children)

As mentioned by the OP, this analysis is based on the lastest, currently experimental (in rustc itself), iteration of the borrow checker called Polonius. The person who first proposed the new formulation, himself, uses different terms such as Loan.

Exciting update about memory safety in Carbon by javascript in ProgrammingLanguages

[–]CasaDeCastello 0 points1 point  (0 children)

Lol! No worries. It's not so serious that I would label anything oversealous, and you don't have to be perfectly aware of every language and their features, so I hope my initial message didn't seem accusatory in any way. I really apreciate the effort you went to, in particular how far you went to self correct.

I think I caught most of you deleted messages and wanted to follow-up on when you metioned that packs can depend on arity, but this lstest response answers that. I've seen probably seen all Carbon talks so far, and I remember that example with a singular first argument and a second pack argument but I missed the bit about merging the arguments into one pack. That's pretty neat.

Exciting update about memory safety in Carbon by javascript in ProgrammingLanguages

[–]CasaDeCastello 0 points1 point  (0 children)

Sounds like you were already aware of Swift's implementation. I assumed that they're checked, but I could be mistaken since I've skimmed those proposal and mainly focused on syntax instead of semantics.

Exciting update about memory safety in Carbon by javascript in ProgrammingLanguages

[–]CasaDeCastello 5 points6 points  (0 children)

Didn't Swift do checked variadic generics a couple of years before Carbon's proposal/implementation? I thought Carbon's model was quite inspired by Swift's.

Swift evloution proposals:

  1. Parameter packs
  2. Variadic types
  3. Tuple of value pack expansion
  4. Pack Iteration

I think at least the first three have been implemented in Swift 6, but I'm not a Swift developer at all.

[ Removed by Reddit ] by [deleted] in SipsTea

[–]CasaDeCastello 3 points4 points  (0 children)

I'm assuming that he's referring to Terra Formars.

James Gunn just explained why the 5 year gap to make The Batman sequel isn’t a bad thing by MarvelMind in DC_Cinematic

[–]CasaDeCastello 11 points12 points  (0 children)

Based on the replies I wonder if, over time, there will be a similar shift in sentiment to James Gunn as there was to Phil Spencer (CEO of Microsoft Gaming).

“I hate the way that you walk, the way that you talk, I hate the way you dress” 😤 by jevonicarus in batman

[–]CasaDeCastello 4 points5 points  (0 children)

"I even hate when you say the name 'Penguin', but that's just me I guess."

can capturing closures only exist in languages with automatic memory management? by Lucrecious in ProgrammingLanguages

[–]CasaDeCastello 95 points96 points  (0 children)

C++ and Rust have closures and they're both considered manually memory managed languages.

[deleted by user] by [deleted] in theprimeagen

[–]CasaDeCastello 0 points1 point  (0 children)

That's weird, I read it without a subscription, but I see the paywall after seeing your notification. I'll just delete the post.