Hacker News new | ask | show | jobs
by darthcoder1010 1512 days ago
> I would hate to be the creator of Hare and get so much crap for simply daring to exist.

Certainly.

Since the announce of Hare I've seen __too__ much criticism IMHO.

I think the authors have stated clearly the intentions and the features of the language: They just want a slightly better C. Of course you may not like it, but no need to be that harsh...

2 comments

A hash table that compares hashes instead of keys, doesn't support deletion, doesn't distribute keys evenly etc. is not even wrong; criticizing it is definitely not "crap for daring to exist", especially in the polite tone of the linked article.

If Hare is intended to be a deliberately Spartan C replacement, so be it; but pretending that writing a hash table is easy looks like the immature and arrogant opinion of someone completely unaware of his ignorance.

> A hash table that compares hashes instead of keys, doesn't support deletion, doesn't distribute keys evenly etc.

I agree, that implementation is definitely flawed. Probably the author do not consider that important a proper hashtable.

> looks like the immature and arrogant opinion of someone completely unaware of his ignorance.

This is what I'm referring to when I say "harsh" criticism. Maybe he is wrong, but I think there are better ways of saying it: "Hey, maybe a proper hashtable is not that easy.. have you consider [insert here improvement proposal]?"

Everybody can have a bad day and write terrible code, but blogging about it as a positive example and as evidence that a practically useful programming language doesn't need high quality generic data structures suggests a deeper problem at understanding the needs of programming language users.

Wrong questions (focusing on the narrow case of unique, overspecialized application-specific data structures), not only forgivable wrong answers (that hashtable from the Hare compiler, after all, could be close to good enough for its specific usage).

Personally, I think abstract data types based on some kind of macros or templates would be a valuable feature for Hare, even if their use in the standard library is limited, because someone will want to write reusable libraries.

Even within the confines of an application, there is a practical need to deal with different uses of a data structure in the same way and make changes in one place (e.g. "the generic hashtable in our ORM" ) rather than in possibly numerous quasi-duplicates (e.g. 250 different struct to struct hashtables representing database query results in a large business application).

C++ templates, a good example of what could be realistically offered by Hare, allow to upgrade a definition from "do X with one type" to "do X with any suitable type", which is a useful abstraction even without reuse (what's actually expected or not of the type parameters becomes explicit), a technique to write general libraries "for free" (e.g. you can put whatever you want in our hashtable), a technique to define general language foundations (e.g. you can have smart pointers to anything).

People will bash anything new that might spoil their favorite language's success.

So far, not many languages measured up to C. Hare just might, with it's right amount of simplicity and C's footguns gone.

So it's small surprise to see The Rust's Evangelist Strike Force in action on these threads about Hare.

Unfortunately, the only footguns I see talked about in C are memory safety. Well, tbh I do see then occasional discussion of undefined behavior also. I think these are the main areas people are getting bothered over with Hare too.

A huge potion of the criticism at this point towards Hare has been summed into three points: no ‘generics’, no memory safety, and small stdlib combined with no package management.

But, I can imagine that if Hare had generics using template metaprogramming then people would complain about how language design has shown that templates are not good enough, so it needs to be not just a way to have compile time type specialization of data structure, but enable ad hoc polymorphism as well and of course that needs traits or typeclasses.

Further, if Hare used testing and fuzzing and modeling, then claimed to be within the bounds of some error percentage ‘safe’ from leaks, use-after and double free, out of memory conditions; the counter claim would be that you can not be safe, for ANY usage of the word unless you have ownership and borrow checking.

And finally, without a centralized, language committee backed and certified web based way to store and access libraries Hare will never be able to make usable and fit for purpose software, so a package manager is a must have to be worth even considering.

All that said, I don’t think it is exclusively users/promoters of Rust that are complaining/disparaging Hare’s very existence. But it certainly seems like many, many people seem to be convinced that their use case/product goals/preferences are the only considerations for any individual of group making engineering decisions.

You summed it up so well.

And those are the very same reasons Hare should remain a simple language.

You can never please the crowd, but you can please yourself and a couple of your friends.