this post was submitted on 15 Nov 2023
21 points (88.9% liked)

Programming

17416 readers
79 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 1 year ago

Inko doesn't rely on garbage collection to manage memory.

Hmm...

Inko allows multiple borrows (both mutable and immutable borrows), and allows moving of the borrowed values while borrows exist

???!!!

To ensure correctness, Inko maintains a reference count at runtime. This count tracks the amount of ref and mut references that exist for an owned value. If the owned value is dropped but references to it still exist, a panic is produced and the program is aborted, protecting you against use-after-free errors.

Oh. It's a bit cheeky to do runtime ref counting under the hood and then go and say you don't rely on garbage collection. It's not a full tracing garbage collector - it's worse, it lets you create dangling references and then panics at runtime.

Inko looks interesting, for sure, as a Rust-lite that makes some kinds of code easier to write at the cost of more potential panics (safer, maybe...but desirable?). I'm not sure it's for me though.

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago) (1 children)

Inko looks like it copied Rust's homework and changed it a little.

I don't really see what it offers that I couldn't get from another lang. What's the USP?

[–] [email protected] 3 points 1 year ago

Its concurrency model is the biggest standout for me. Anything taking inspiration from Pony is worth a look