this post was submitted on 28 Feb 2024
5 points (100.0% liked)

Hare

47 readers
1 users here now

Welcome to the Hare community!

Hare is a systems programming language designed to be simple, stable, and robust. Hare uses a static type system, manual memory management, and a minimal runtime. It is well-suited to writing operating systems, system tools, compilers, networking software, and other low-level, high-performance tasks.

ยฉ Drew DeVault

๐ŸŒ https://harelang.org

founded 10 months ago
MODERATORS
 

What do you think about Hare? I think it takes best from different languages, intentionally or not...

It is simple like C, but safer, and at the same time allows you ~~to shoot yourself in the foot~~ to take control and make mistakes if you want.

Example from this blog post two years ago:

fn io::write(s: *stream, buf: const []u8) (size | io::error);

// ...

sum += match (io::write(s, buf)) {
case let err: io::error =>
	match (err) {
	case unsupported =>
		abort("Expected write to be supported");
	case =>
		return err;
	};
case let n: size =>
	process(buf[..n]);
	yield n;
};

Expression-based syntax and match statements remind me of Rust, but it implemented simpler without options...

Maybe you already used Hare in your project. Interesting to read your feedback...

Do you like it? Why?
Dislike? Why?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 9 months ago (1 children)

Looks like a bad rust wannnabe. The site doesn't really give any reason or reasoning or why it's special, who uses it, what libraries or bindings are available. Nothing about platform support or targets, compilers or interpreters. No mention if it's integrated in any distribution or package system.

I'll probably never look at it again unless it comes up in some interesting context.

[โ€“] [email protected] 2 points 9 months ago (1 children)

Read about platform support, and faq. You should prefer custom installation, example for FreeBSD.

And are you rustacean?

[โ€“] [email protected] 2 points 9 months ago

Ah. Thanks. I'm not particularly, but rust definitely has crazy potential and makes a good tool where available. And it does keep coming up with surprises like having a target for Atari 800XL.

Hare does have a mighty nice mascot, too.