Drew wants a borrow checker for Hare

Drew wants a borrow checker for Hare

harelang.org/blog/2022-06-21-safety-features/

Attached: 1656418472570.png (256x256, 28.84K)

Other urls found in this thread:

doc.rust-lang.org/stable/reference/lifetime-elision.html
drewdevault.com/2022/05/30/bleh.html
mirror.drewdevault.com/ares.pdf
twitter.com/SFWRedditGifs

basic aliasing/UAF checker is alright, just don't overdo it with those lifetime annotation

Based. Every systems language needs a borrow checker.
Don't you always need lifetime annotations, for when the compiler isn't smart enough?

Those do don't understand Rust are destined to invent a poor copy of Rust in the long run.

>Don't you always need lifetime annotations,
you can just limit the allowed patterns to write, which is fair for a language that doesn't even have threading or atomic support desu

Rust shouldn't have a monopoly on compile time memory management. It has some great ideas, but on the other hand it's definitely not the language I want to work with for the rest of my life.

>no closures
>no generics (or preprocessor to make up for it somewhat)
>no proper async io
>not that much safer than c with reasonable compiler flags
why would anyone use this? contrarianism?

The problem is that you can't really half ass it. For instance, when a programming language adds types, users start to expect that the interpreter/compiler will always catch type errors, even if the type system is unsound. In this case, users will start to expect that the compiler catches every lifetime error, despite the compiler only catching a subset.

>Those do don't understand Rust are destined to invent a poor copy of Rust in the long run.
Rust is a poor copy of Rust.

I like ze rabbite

>no closures
Closures are difficult in unmanaged languages because you have to allocate them onto a heap and manage their lifetimes.
>no generics (or preprocessor to make up for it somewhat)
Generics increase compile time, and I believe Hare uses a custom compiler from scratch which is built for speed.
>no proper async io
Async IO is a difficult problem to get right and even more difficult for an unmanaged language. See Rust's crappy "colored" approach and all the unsoundness with Pin.
>not that much safer than c with reasonable compiler flags
Fair enough, but Hare is cleaner and has a lot more ergonomic features than C, such as better error handling and discriminated unions.

>Don't you always need lifetime annotations, for when the compiler isn't smart enough?
pretty much, otherwise your allocations will live too long or forever.

>Drew wants a borrow checker for Hare
A thread died for Jew DaFaggot

>Don't you always need lifetime annotations, for when the compiler isn't smart enough?
The Rust compiler never even really tries to make them up for you. In simple cases you can leave them out, but they're then inferred based purely on the function signature, not on the body: doc.rust-lang.org/stable/reference/lifetime-elision.html
This ensures you can't accidentally break backward compatibility without touching the signature.
I'm not sure you could have a usable system with no annotations at all, but I haven't thought about it for very long.
One thing that's very useful to annotate explicitly is the 'static lifetime. If you have a reference to something like a string literal that'll never die you can give it that and the borrow checker will leave you alone as long as you don't try to swap in a shorter-lived reference.

STOP BULLYING DREW.
drewdevault.com/2022/05/30/bleh.html

Attached: fapello_com_2022-04-08_10-37-46.jpg (908x1080, 147.72K)

>This one might raise eyebrows, but I consider Hare’s lack of a package manager to be an important security feature.

Attached: 669.jpg (1080x564, 37.6K)

seems like drew has implicitly admitted that the "threats" he received were just people asking why in god's name people would use his memelang instead of C with extensions

where does he mention threats?

He's going to kill Rust

mirror.drewdevault.com/ares.pdf

Sounds better than Serenity desu.

> Plan 9 inspired microkernel OS
It's a great idea. If done correctly and if other competent people will join the project it could be a very interesting OS i would use over linux

If they just use Linux drivers and filesystems in this new system, things can get interesting.

Let's hope not.
I'm no expert at all but it looks like it would be hard to port them considering the project characteristics
For fs i bet he would rewrite 9front's cwfs or hjfs