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...
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.
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 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?
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.
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.