Skip Navigation

What do you think about Hare programming language?

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?

6

You're viewing a single thread.

6 comments
  • First time I'm seeing it. From the sidebar

    Hare uses a static type system, manual memory management, and a minimal runtime

    My question is: what does it provide that C/C++ doesn't? It doesn't seem to provide memory safety, C also has a minimal runtime, C/C++ also have a static type system... does it have better tooling? A package manager?

    CC BY-NC-SA 4.0

    • TL;DR: Some dumb guy who wanted to make a language, but could not stick to a standard, pulled up an LLVM tutorial and made some shit.

      Seriously people, stop 'inventing' languages with new syntaxes. Define supersets. Make old languages memory safe. But if you are dumb enough not to understand how to read a standard, may be don't be defining a new language! lol.

      I am personally at the start of my langdev journey. I just wrote ASDL in C and I am making an Awk2C translator in OCaml. I will NEVER touch a language not backed by a WRITTEN standard on syntax and semantics. That includes Rust. Or even my darling D.

      Fuck cares about memory 'safety'. Dumb people can't manage memroy. Here are rules to manage memory:

      1- In a passive program, make a heap, dump when done --- you can use my script, AllocPP.pl for it.

      2- In an active program, collect on this heap with mark and sweep, dump when done

      I am not a professonal by ANY means and these things are obvious as fuck to me. I most like am a 'hobbyist' at this point because I have been unemployed for almost a year and 3 months. If you can't surpass the knowledge of a dillitant like me, maybe reconsider your career choice.

      Also I don't mean this towards the person I commented. I mostly mean in general.

      Done!

      • Some devs just learn new languages to expand their view or to avoid burnout. Yes, I agree that memory safety is not a problem and all these C-killers suck. Hare is not positioned as a C killer, it can be used together with C.

        And look at today's situation in the industry. Try to say in the Rust community "Rewrite it in C" or suggest some newcomers to write in pure C some app. All these commercial developments smell bulked overhyped technologies that have only one goal - make money for companies and companies support these tech. All job offers do not expect you to be an expert in computer internals or C, or even JavaScript. You just need to know the frameworks.

        All of these bring pure software quality. C will never die, and those who write on it will do. But newcomers need something different and better it will be as efficient as C.

        It is just one point of view...

        • Yeah this is all true. I myself am a fan of learning as many languages as possible. When you pick up the ability to read an EBNF grammar, and learn the ins-and-outs of an imperative language, there's little stopping you from picking up a new one. The language lies in its Standard Library. Like I'm fairly sure Rust won because of its STD. Nim came out in 2005, one year before Rust, and it failed to catch on because of it's stupidly stupid STD. Plus it's slower (check out my benchmarsk here).

          What's funny is, few people are actually using Rust as a proper systems language. By 'few' I mean a small percentage of its users. I only know one or two people (out of the ones I know) in the Linux/BSD dev scene who have a zeal for 'Rust-only' code base --- systems base that is. Most of the people who use Rust use it for unrelated, non-systems reasons. This fora we are on is an example. It's not inherently a 'bad' thing mind you. I just don't understand that, why people don't get that it does not matter if a daemon-based, service-based software is written in a 'fast' language? A server is mostly IO-bound. You could write the backend for your system in machine binary code and when there's clutter in IO, it's will use as much 'electricity' as fucking NodeJS would! There's literally no reason to use Rust in a web backend. 'Speed' is good when a software is CPU-bound. But whah what do I know.

          C just works. Face it. It's protable as fuck. There's fuckchain of toolfuck for it. It's 'text', Rust is 'subtext'!

          • Thank you for benchmark. Python is a player, lol.

            Rust is very overhyped and I do not accept its syntax, boring. I like C and Hare. I am not a system dev, it's just a hobby, so my opinion can't be proved by solid experience. But I came to C after learning and trying using Rust in a hobby game dev. Hare I like to have in my backpack as an alternative, fresh and developing tool. It is not overhyped and his team are not trying to reach popularity. Just making not bad language. IMHO.

You've viewed 6 comments.