BryanBennett,

Anyone else getting tired of getting the credit for (G)ADTs?

No? Just me?

, , , and among others had this long before Rust and without the complexity of the borrow checker or lifetimes. Rust moves this concept of type system as bug prevention system forward for systems programming, but there is a long history of good compilers (targeting application development, not systems) that did this already (and in a few cases - better!). I am tiring of the narrative that Rust is the ”only memory safe language"...

mo8it,
@mo8it@fosstodon.org avatar

@BryanBennett I would love to correct anyone in the Rust community who claims that Rust invented algebraic data types. I didn't see someone say that yet.

Of course, it is a feature. And people will say "Rust has X". They don't have to say "Rust has X where X was first invented by Y and implemented by Z1, Z2, …"

It is worth noting that Rust is not only targeted at systems programming. It is a general purpose language that you can get as low level with it as you want.

BryanBennett,

@mo8it: i don't think anyone is arguing that they INVENTED ADTs, but that it seems it is the only place people are willing to USE them because of Rust's inertia.

And of course Rust is "general purpose". But GCs are in most application level languages for a reason: they're damn convenient to use! In my work, I am generally not chasing every iota of performance. I need something that I can be sure meets user and business requirements. Im sure that all involved here agree that ADTs REALLY REALLY help with this. But how and when my primitives get cleaned isn't a HUGE concern for me. Yes - i will try and do the right thing by closing handles and not wasting memory etc, but by and large - it will be okay as long as the types are correct and the GC is halfway competent.

Im not saying that acknowledgement must be given for every feature, but I would like to see some increased interest in "less complex" languages that include useful features like ADTs without fundamentally changing the way I have to think about data handling .

mo8it,
@mo8it@fosstodon.org avatar

@BryanBennett It is funny for me to call Rust a complex language after tagging Haskell and Scala.

My conclusion from my last blog post about teaching Rust in 5 days at my university is that Rust is not complicated if students with limited experience in Python can learn it in 5 days.
Complicated and complex are different adjectives, but I can expand my conclusion to "Rust not being complex" too. It is a language with new concepts that require people to first learn them before starting to hack.

kornel,
@kornel@mastodon.social avatar

@BryanBennett The first Rust intro says:

> Rust is a language that mostly cribs from past languages. Nothing new.

http://venge.net/graydon/talks/intro-talk-2.pdf

However, Rust's combination of safety with heap allocations but without GC is unique.

BryanBennett,

@kornel: and my complaint is partially that while it is unique, it does not make it a panacea. I like Rust. I do not think Rust's complexities are necessary for general application development. Additionally I believe that while Rust maps well to WASM, the web is the LAST place I should be considering ownership etc.

kornel,
@kornel@mastodon.social avatar

@BryanBennett I get Rust is hard to learn, and ownership/borrowing can seem like frustrating obstacles.
People use Rust in lots of places because once you get proficient, "fighting the borrow checker" stops being a problem, and you get a quite productive, fast, modern language.

WASM in particular doesn't have a GC yet, so for non-trivial programs you don't have other memory management options that are reliable and low overhead.

BryanBennett,

@kornel: I am fluent in Rust - at least in so far as basic tasks go - so I have gotten over much of the "fight" with the borrow checker. I still occasionally struggle with Arc/Rc/Box but mostly with when to implement them and how to pattern their usage + the complexities of generics in Rust (a sore spot for me that I think gets too little attention generally - it maps nicely to my brain, but the DOING is more difficult for some reason?). I am useful in Rust, but I think it steps too far for too little gain. Most applications do not need the ownership semantics. A higher level abstraction will do perfectly well, and yet the hype is implying everyone needs to learn Rust because it is "safe" and cool (when there are other languages that are just as "safe"!)

That being said: WASM's GC discussions map very nicely with OCaml's currently implemented GC in some areas, from what I hear. I'm very heartened to hear that :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines