News for hackers. Stuff that matters.
Re:Criticizing Hare language approach for generic data struc... by socialdemocrat on Wednesday May 04, 2022 @09:09AM (#31259872)
Why do people spend so much energy shooting down a language nobody uses? If you don’t like it you don’t have to use it. I would hate to be the creator of Hare and get so much crap for simply daring to exist.

He is making a language he likes and wants to use. There are probably some people who like it and find it useful. Good for them! A lot of us have dreams of building our own language. He is following his passions and people are just lining up to be Debbie Downers.

Now I almost feel like I need to learn more Hare to give the guy some encouragement and positive feedback on things done right. Be the glass half full guy.

Well I won’t. I think Zig will be the last C-like language I invest time in. It is so easy to get sucked into something new that will never go mainstream.

Re:Criticizing Hare language approach for generic data struc... by jmmv on Wednesday May 04, 2022 @09:39AM (#31260211)
> Why do people spend so much energy shooting down a language nobody uses? If you don’t like it you don’t have to use it.

Because this language isn't made by a nobody. It's made by a popular person with a following, so the language _will_ get used by a non-insignificant number of people. And those people _will_ (re)implement all the things that you want a language to have (database connections, networking libraries, (de)serialization libraries, etc.). And these things, which can be performance/security-critical, will be impacted by the issues people are pointing out.

Once we reach this plausible scenario, it's likely that some software that you want to use on, say, your server, will depend on those libraries. And _then_, like it or not, _you_ will be impacted by the choices of the language and be subject to whichever bugs all those people made when reimplementing (in this case) hash tables.

We could assume that everyone writing libraries in this language will be an expert and not make mistakes, but that is just a non-starter. In a sufficiently-large ecosystem, the people writing code will come from all sorts of backgrounds and have all levels of expertise, so you _will_ get buggy code in important libraries, and those bugs are the stuff most CVEs are made of nowadays.

I get with what you are saying that people are free to develop a language as they choose, and I agree with you there---I'm building my own and it's _not_ a modern language---but there can be consequences in the larger industry, and that's the "scary" part.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @10:24AM (#31260866)
> And those people _will_ (re)implement all the things that you want a language to have (database connections, networking libraries, (de)serialization libraries, etc.). And these things, which can be performance/security-critical, will be impacted by the issues people are pointing out.

This language is only available on platforms where you are free to choose whatever software you want. If you think a Hare program is insecure, don't use it.

Re:Criticizing Hare language approach for generic data struc... by jmmv on Wednesday May 04, 2022 @10:58AM (#31261395)
What happens when your financial institution or your doctor, whose IT departments run Linux on their servers to handle your personal data, install such insecure software?
Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @11:19AM (#31261727)
The same thing that happens when they use any other insecure software.
Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @10:59AM (#31261400)
Usually we like for replies here to reply what the person above wrote.
Re:Criticizing Hare language approach for generic data struc... by this_is_eline on Thursday May 05, 2022 @08:49AM (#31272673)
I don't agree with this. 'Important' software, like something you would want/need for your server, is not 'important' enough if it has a considerable amount of bugs, and therefore _will not_ be used by significant amount of people. (and will not pose a real threat to the community at large). At least not significant enough to explain all the hate authors and contributors are getting.

Let's say it's 2030, and I want to host my own matrix server. I would first compile a list of all matrix server implementations, and filter out those with confirmed bugs, and only then choose one (at random or some other criterion). The ones with bugs introduced by some library written in Hare/C/Rust/C++/X language will never be popular enough to even end up on the starting list cause people don't want to use buggy software (at least if there are options and in sufficiently-large ecosystem, there are options). And you might say that those bugs will go unnoticed - yes, but no more unnoticed than any other bug introduced by faulty logic but written in, say, Rust.

Also:

> so the language _will_ get used by a non-insignificant number of people

Hare is fairly opinionated (e.g. it mainly targets FOSS operating systems) so saying that it _will_ be used _just_ as a result of being related to ddevault (a person with a following), is a _wild_ guess. It does not matter how big of a following the author has, if the language itself is bad, it will not get used, or at least, it will get forgotten soon enough.

>In a sufficiently-large ecosystem...

In a sufficiently-large ecosystem, performance/security-critical software will be created using a language that is used not because of the author's following… Again: if the language itself is bad, it will not get used, or at least, it will get forgotten soon enough.

You can write buggy code in _any_ language.

Re:Criticizing Hare language approach for generic data struc... by gwern on Wednesday May 04, 2022 @04:50PM (#31265691)
I call this 'bitcreep' (https://www.gwern.net/Holy-wars): the mere existence of a language or library will make coordination harder and gradually impose costs on the rest of the world and form a little bit of a gravity well sucking everyone towards it, for better or worse. If there are network effects and gains from networks, then there are likely anti-network effects and losses from splitting networks...
Re:Criticizing Hare language approach for generic data struc... by sounds on Wednesday May 04, 2022 @10:07AM (#31260624)
But why be the one to shoot it down?

If the industry makes mistakes, that's not news.

Re:Criticizing Hare language approach for generic data struc... by Shish2k on Wednesday May 04, 2022 @10:22AM (#31260846)
Imagine if we’d had the opportunity to complain about PHP or JS back in their early days, and had the opportunity to fix some of their awful decisions _before_ they became practically set in stone?
Re:Criticizing Hare language approach for generic data struc... by throwaway17_17 on Wednesday May 04, 2022 @10:34AM (#31261015)
There is a distinct difference between PHP, JS and Hare. Hare is being developed and designed with a particular point of view by a developer and early adopters who are passionately supportive of that POV. PHP and JS were both thrown together with minimal direction and to achieve specific goals in as fast a time as possible (if I am remembering both languages begins correctly). It could be possible that another language in the position of JS and PHP at its inception might be amenable to deep and fundamental changes; however, I do not think Hare fits this scenario.

If Drew and Co want to make Hare the way it is, awesome! If you don’t want to use share and prefer something else, great!

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @11:01AM (#31261446)
Simply, it is a bad point of view, and deserves discouragement in exact proportion to the amount of promotion it gets. He wants it both ways, and does not deserve that.
Re:Criticizing Hare language approach for generic data struc... by throwaway17_17 on Wednesday May 04, 2022 @11:40AM (#31262028)
What particularly are you objecting to about Devault’s POV? I mean most of this thread and the article are based on the lack of generic data structures or complaints that Hare is not Rust. The complaint about lack of built-in data structures seems to be focused mostly on developer comfort, with a sprinkling of issues concerning possibility of bugs in implementations of specific structures. With regard to the continual comparisons to Rust, ala ‘memory safety’, if any model of software development outside of Rust’s limited paradigm is ‘bad’ then nearly all code in use today is ‘bad’. That seems to be an unsupportable position in the extreme.

I understand some people will not want or value any given piece of software or infrastructure, but the blanket pessimism is not proportional to the alleged detriments proposed by Hare’s mere existence.

Maybe I am just being overly sensitive to what I see as over reaction to someone’s programming language preference, but this is the reason I have never, and probably will never, release the language I made and use day to day to the public.

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @12:41PM (#31262827)
You cite a list of trivial cavils, which I have no truck with.

Hare's problems are much deeper. They stem directly from Drew's fundamental misunderstanding of the nature of software development. Drew is correct that managing complexity is central to the problem of software development. He is 100% wrong on how a programming language can contribute to solving that central problem.

There has been a great deal of progress, in the past five decades since C burst on the scene, on managing complexity in programming tasks, with programming language design taking a big bite. Hare adopts exactly none of that success, setting users straight back to the 1970s again. That might have been fine if demands on programmers were no greater than in the 1970s (although the bugginess of software coded then argues otherwise), but anyway we do not live in that world anymore. The programs we want to run don't fit in 64K of RAM and run single-threaded with no network connections, anymore. Where a 1970s language is used for programs today, we all suffer from the failings the language almost unavoidably invites into them.

The fundamental insight that Drew has wholly missed is that essential complexity demands more attention to get right than is typically available for one use case. We have learned that pulling complexity into a library component, or (better) a Standard Library component, or failing that a programming language feature, enables attention to be paid to it amortized across all the programs and libraries that depend on it. All the meaningful progress in programming languages since been in finding ways to bring more of what must be expressed into one place so it may be more widely usable, and able to command correspondingly more attention to its performance and correctness. Standard library components in our modern languages successfully remove their complexity from what programmers must manage.

The ways we have discovered to help with this process include powerful type systems that have been put to work doing heavy lifting far beyond mere "type checking". We have generics to work with types the way types work with values. Certain languages provide extra tools such as destructors/Drop traits that enable automating resource management. Many languages assert direct responsibility for pieces of that task, imposing borrow checking or GC. There is much left to do.

Hare provides exactly none of the tools that have been discovered to encapsulate complexity into carefully correct and generally useful components, or to enable using such a component in all the different places and ways it would be useful. This failing is painfully evident in the library components it does attempt.

In the 1970s, Hare might have competed with C and Pascal to express the then newly valued "structured programming". Today it is a toy. Evaluated as a toy, there is nothing wrong with it. But it is not presented as a toy. As a tool for programming in the modern world, it is sorely lacking everywhere that C is sorely lacking, that make C directly responsible for the massive suffering documented in the litany of CVEs, botnets, database exposures, and ransom events.

Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Wednesday May 04, 2022 @06:45PM (#31266844)
"Hare provides exactly none of the tools that have been discovered to encapsulate complexity into carefully correct and generally useful components, or to enable using such a component in all the different places and ways it would be useful."

I would be very cautious when calling anything that encapsulates complexity "carefully correct" or "generally useful". Hiding such complexity behind language features is how we ended up with new generations of programmers who have no idea how to code anything themselves.

If generations and generations of stack overflow copy-pasters are the future of programming, then I don't want to be a part of it.

"In the 1970s, Hare might have competed with C and Pascal to express the then newly valued "structured programming". Today it is a toy."

Excuse me? The most useful, the most endured, the most sane and the most understood coding paradigm is a toy to you? You know, some of us really like to think of our programs as many procedures being called one after the other.

That's the most logical way to think about them, because it's the exact way the CPU sees them.

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @07:40PM (#31267344)
Yes, a toy: inadequate for professional work. You can cut grass with scissors, but nobody who understands the task will hire you to do it.

CPUs do not, in fact, see procedures. They execute machine instructions. Your "procedures", exactly, 'encapsulate complexity behind a language feature'. A rudimentary feature, true, but one identically the same as is found in modern languages, among their more powerful features.

I am, indeed, always cautious about calling things "carefully correct and generally useful". Still, I am aware of many language features and standard library components in modern languages that fully satisfy those criteria.

Who pastes code copied from stack overflow? I assume that was a ham-handed attempt at an insult. You are welcome to continue fooling with toy languages, old and new. Pretending they are adequate tools for serious work says more about you than about them.

Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Thursday May 05, 2022 @04:45AM (#31271051)
"Yes, a toy: inadequate for professional work. You can cut grass with scissors, but nobody who understands the task will hire you to do it."

Can you explain what you mean here? In the context of structured programming.

"CPUs do not, in fact, see procedures. They execute machine instructions. Your "procedures", exactly, 'encapsulate complexity behind a language feature'."

That's right, CPUs execute instructions. Those instructions are executed one after another, with jumps when a certain operation should be repeated or skipped. This is the definition of structured programming. Structured programming is a simple abstraction over how CPUs execute machine instructions.

I don't see any objects with methods there. Nor do I understand how would a CPU understand a lambda function or care if something is immutable or not.

"I assume that was a ham-handed attempt at an insult."

No insult there. It is just a sad reality how many developers rely on Stack overflow instead of using their own head a little.

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Thursday May 05, 2022 @11:38AM (#31274723)
It is not, in fact, the definition of structured programming.

Structured programming was defined by Edsger Dijkstra, and consisted originally of a model of programming with restrictions on where branches may go. Later programming language constructs if/then/else and while implemented this model. It does not address subroutines.

I describe C and similarly primitive languages as toys because they do not provide the expressive power needed to enable the levels of productivity and reliability demanded of serious work.

Re:Criticizing Hare language approach for generic data struc... by karmakaze on Wednesday May 04, 2022 @12:03PM (#31262338)
I think the critique is more valuable for other readers like the non-Hare users in these comment threads and in particular language designers, than at Hare developers. If it can inform Hare development to make a better language that's great too. If they choose their path ignoring it, that's their prerogative, but at least it was expressed and given a chance for adapting.
Re:Criticizing Hare language approach for generic data struc... by klyrs on Wednesday May 04, 2022 @11:18AM (#31261701)
> But why be the one to shoot it down?

It's a very young language. One might consider that early mistakes can be addressed, but only if somebody speaks out about them.

I question framing this question as "shooting it down." The project will clearly survive this criticism. The article is by somebody who took the time to learn the language, and will probably continue to invest their time into the language. Criticism of this kind is a gift.

Re:Criticizing Hare language approach for generic data struc... by HL33tibCe7 on Wednesday May 04, 2022 @09:21AM (#31259992)
If the author of Hare didn't want feedback on his language, or didn't want other people to use his language, he shouldn't have advertised it in blog posts and on sites like https://harelang.org/, which is clearly an advertisement for the language. As it happens, he has.

You might think "nobody will use the language", but if nobody pushes back and says why people shouldn't use the language, perhaps people will start to. It's really important that people do write feedback pieces like this, because it helps other people be informed about their choices.

Re:Criticizing Hare language approach for generic data struc... by lijogdfljk on Wednesday May 04, 2022 @09:50AM (#31260365)
Also early on in the language seems a great time to respond to feedback. 3 years in when it has traction is terrible, heh.
Re:Criticizing Hare language approach for generic data struc... by mariusor on Wednesday May 04, 2022 @11:44AM (#31262082)
So what you're saying is basically: "he's asking for it", right?
Re:Criticizing Hare language approach for generic data struc... by avgcorrection on Thursday May 05, 2022 @02:37PM (#31276977)
That counter doesn’t have much force to it when we’re talking about mere argumentation and not violence.
Re:Criticizing Hare language approach for generic data struc... by HL33tibCe7 on Wednesday May 04, 2022 @12:05PM (#31262359)
That's the point I make in the first paragraph, essentially. But the second paragraph is another reason.
Re:Criticizing Hare language approach for generic data struc... by mariusor on Thursday May 05, 2022 @07:03AM (#31271824)
Do you think that this type of argument has more value when talking about Drew than about a victim of sexual abuse? I think the rhetoric of "asking for it" works equally poorly when applied to all aspects.

And I will assume that your next comment will be about how the two don't compare. And I am in full agreement with that, except for the fact that trivializing abuse is another element that people use in this type of debate, and I believe that abuse is abuse. It might not have the same emotional impact on the victim, but the abuser psychology is similar in all cases, and the slippery slope of losing sensitivity to it begins with accepting discussion board bullying as normal.

PS. However this discussion is at least an order of magnitude removed from TFA, which is not abusive, merely presumptuous and premature.

Re:Criticizing Hare language approach for generic data struc... by Atalocke on Wednesday May 04, 2022 @10:08AM (#31260645)
> There are probably some people who like it and find it useful.

I've really been enjoying Hare. As a primary Go/Rust developer its syntax and limitations feel like what I've been looking for and it's youth predicates plenty of opportunity to work on new project. When I was working on a ANSI Colors lib [0] last night I spent a lot of time in the community IRC. Your post is basically what everyone's feeling. This is a language designed for people who like it's style. It doesn't need to have this or that feature. And if the community changes their mind, what better candidate than an open source tight-knit young language?

[0] https://github.com/tristanisham/color

Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @09:15AM (#31259922)
We don’t need more memory-unsafe languages with no generics and no functional programming. We just don’t. If it were a toy project for learning and pedagogical purposes that’s one thing but for code that’s supposed to be used in production it’s useless.
Re:Criticizing Hare language approach for generic data struc... by capableweb on Wednesday May 04, 2022 @09:31AM (#31260112)
You sure speak surely about "us" like there is just one group of programmers out there. Some people love JavaScript, some people love C. Some people only use programming languages, some create new ones.

Live and let live, don't tell others what they need.

Re:Criticizing Hare language approach for generic data struc... by throw10920 on Wednesday May 04, 2022 @10:28AM (#31260944)
Let me quote the part of the comment that you didn't read:

> but for code that’s supposed to be used in production it’s useless

This isn't about doing what you love - it's about engineering a product, a product that needs to have certain safety, security, and stability guarantees. That's the context of this conversation, and for that purpose, Hare isn't suitable.

Re:Criticizing Hare language approach for generic data struc... by rowanG077 on Wednesday May 04, 2022 @09:38AM (#31260198)
Honestly memory unsafe languages shouldn't be used with exception of very few corner cases. It's the same reason why we no longer allow cars without seatbelts. You don't go around saying that seatbelts shouldn't be mandatory because you don't need them.
Re:Criticizing Hare language approach for generic data struc... by netr0ute on Wednesday May 04, 2022 @09:45AM (#31260302)
What's with this obsession about what other people do? You don't have to use a memory unsafe language, but others might.
Re:Criticizing Hare language approach for generic data struc... by rowanG077 on Wednesday May 04, 2022 @10:19AM (#31260803)
Because software is generally written so that people use it. Memory unsafe languages have proven it's impossible to write secure software in, even by the best of the best developers. That's why I made the comparison with seatbelts. If you want to drive your car on public roads(deliver production software to users) you are not allowed to use memory unsafe languages(you must use a seatbelt). If you just make software for yourself that you don't release to the public no one will care if you write it in C or whatever.

It has nothing to do with anything you do. It has everything to do with the impact it has on everyone but yourself.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @10:54AM (#31261325)
It’s also massively unsafe to drive in general, so we should probably ban the usage of cars wherever possible.
Re:Criticizing Hare language approach for generic data struc... by rowanG077 on Wednesday May 04, 2022 @11:01AM (#31261440)
Driving also brings great value. Using C over another language "Because you can't tell me what to do" does not. The more apt comparison would be if we had fully self driving cars that are proven to make almost no mistakes. And then still wanting to drive a car yourself on public roads, endangering yourself and others.
Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @01:07PM (#31263151)
C and C++ still see overwhelming usage in many industries because of the business value they provide in terms of performance and how quickly you can produce software in it. That does not seem likely to change any time soon- game studios are not widely adopting rust, for example, and I don't expect that to change, even though they impact a MASSIVE amount of people.

Hare's value proposition is simplicity- which allows you to better reason about the software you write, for one thing. We are each entitled to our own opinion about how valuable that is.

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @03:48PM (#31264939)
C and C++ are at diametric opposite ends of the scale of value proposition. Listing them side by side eliminates any credibility your argument might have had.

Hare's "value proposition" of simplicity is, simply, a shuck. Any software effort has essential complexity that your language may help you manage, or chuck you in the deep water to sink or swim. Hare does the latter, and is even self-righteous about it.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @04:28PM (#31265410)
I mentioned performance and game development specifically. I'm sure you're aware that it's common to write C++ that's very close to C while taking advantage of few features of C++. I don't think it's fair to call that the "diametric opposite of C".

Your opinion of Hare's view of simplicity is your opinion. Any software effort has some amount of essential complexity, in my experience many languages and tools quite a bit of incidental complexity that could be avoided.

Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @04:35PM (#31265507)
You can write bad code in any language. (We used to say "you can write FORTRAN code in any language", back when.) C code compiled with a C++ compiler is C, and bad. With the C compiler, you had no choice. You do not get that excuse when you have a C++ compiler.

Avoiding unnecessary complexity is everybody's responsibility. Dumping every last bit of unavoidable complexity onto the programmer where it has been long demonstrated that tooling can take care of much of it is simply irresponsible, and inexcusable.

I do not excuse it.

Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @11:20AM (#31261735)
We license people to drive and have a legal system for dealing with irresponsible drivers.
Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @11:26AM (#31261828)
Companies have policies for software security. Industries have regulations.
Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @11:47AM (#31262116)
The most common policy will be for SOC2, ISO27001. There's virtually nothing about software security in there, other than scanning for vulnerabilities. Everything else is about controls on infrastructure, threat modeling, that sort of thing.

It's not really relevant.

Besides, none of those have to do with software engineers. Compliance doesn't imply any individual responsibility.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @12:03PM (#31262335)
The most common policy for what? I've worked in defense and there are stringent security requirements for applications and servers, which programs written in manual memory management languages would likely fail. "Some existing policies are bad" is not a convincing argument that hare shouldn't exist.
Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @12:07PM (#31262376)
The most common for companies to have/ be required to have.

> I've worked in defense and there are stringent security requirements for applications and servers.

Like? FEDRAMP? The vast majority of compliance is about threat modeling and access controls.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @12:28PM (#31262661)
> Like? FEDRAMP?

No, STIGs.

> The vast majority of compliance is about threat modeling and access controls.

If compliance doesn't address security, that sounds like a bigger issue than a new hobby language existing.

Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @04:47PM (#31265652)
The issue is that no one is taking responsibility for writing safe software. Compliance / regulation isn't, developers aren't either.
Re:Criticizing Hare language approach for generic data struc... by flyingfences on Wednesday May 04, 2022 @10:50AM (#31261264)
I can assure you, the automotive industry uses more C/C++ than you've ever seen. C is used precisely because it's a mature and verifiable language.
Re:Criticizing Hare language approach for generic data struc... by rowanG077 on Wednesday May 04, 2022 @10:59AM (#31261418)
I'm not sure what your point is. I didn't claim memory unsafe languages aren't used, they obviously are. C is in fact not an easy language to verify. There have gone trillions of dollars into that and it's still not solved. You can't verify C. You might be able to verify a subset of C. But if you are in any position to choose any other language you should run, run, run quickly and far away from C.
Re:Criticizing Hare language approach for generic data struc... by flyingfences on Wednesday May 04, 2022 @11:28AM (#31261856)
My point is that your metaphor about "not [being] allowed to use memory unsafe languages" to build a car is completely backwards -- safety-critical embedded systems use C to avoid the abstractions introduced by higher-level languages.
Re:Criticizing Hare language approach for generic data struc... by rowanG077 on Wednesday May 04, 2022 @11:46AM (#31262105)
It's not backwards. C is used out of necessity not because it's such a great language. Safety-critical embedded systems use C because they have to. Not because it's nice. Claiming they do because C is such a great language to write safety-critical software in is a special kind of Stockholm syndrome.
Re:Criticizing Hare language approach for generic data struc... by ncmncm on Wednesday May 04, 2022 @03:58PM (#31265055)
There is no such language as C/C++. Your statement is meaningless, as stated.
Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @09:51AM (#31260386)
I’m allowed to have opinions about what tools should be used for what. I think it’s fair to say you shouldn’t write a production HTTP service in assembly, for example.
Re:Criticizing Hare language approach for generic data struc... by netr0ute on Wednesday May 04, 2022 @10:34AM (#31261027)
The problem with this is that you're now the Ministry Of Truth of programming tools.
Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @10:53AM (#31261311)
You're allowed to disagree with me. I don't claim to be the ultimate authority and I have no power to enforce my opinions. If I were your tech lead and you wanted to use Hare for something I would probably say no but we could have a discussion about it and you might convince me otherwise. But that's not the context here. This is a programming forum, so I will speak my mind.
Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @11:18AM (#31261715)
Doesn't even make sense. The Ministry of Truth is tasked with rewriting the past to match the present.
Re:Criticizing Hare language approach for generic data struc... by avgcorrection on Thursday May 05, 2022 @02:40PM (#31277001)
We all have opinions. The 1984 reference is unhinged.
Re:Criticizing Hare language approach for generic data struc... by staticassertion on Wednesday May 04, 2022 @11:19AM (#31261720)
> You don't have to use a memory unsafe language, but others might.

And we're telling them they shouldn't.

Re:Criticizing Hare language approach for generic data struc... by tonyg on Wednesday May 04, 2022 @09:55AM (#31260447)
A person's actions sometimes have effects on other people. Such as not wearing a mask, for example. Or writing some piece of obscure but critical infrastructure with a memory vulnerability that causes all someone's precious apes to be stolen.
Re:Criticizing Hare language approach for generic data struc... by netr0ute on Wednesday May 04, 2022 @10:35AM (#31261037)
> Such as not wearing a mask, for example.

That's pretty rich

Re:Criticizing Hare language approach for generic data struc... by tonyg on Wednesday May 04, 2022 @11:22AM (#31261771)
How so? I'm sure you take my point: that by indulging selfish wants, we can harm others. Private situations, do what you like; shared or social contexts, not so much.
Re:Criticizing Hare language approach for generic data struc... by netr0ute on Wednesday May 04, 2022 @01:27PM (#31263403)
Masks don't even work for many of the things people want them to work for.
Re:Criticizing Hare language approach for generic data struc... by tonyg on Wednesday May 04, 2022 @01:44PM (#31263589)
Oh, hey! That makes them an even more perfect analogy. They help, massively, protecting others by removing many forms of transmission; but they don't prevent all transmission. Likewise, memory safety helps, massively, protecting others by removing many forms of security vulnerability; but it doesn't prevent all security vulnerability. And, crucially, not to get too far distracted from the original point: both are things we try to make use of where we can, not for ourselves, but for others and for the health of our overall communities. To really spell it out in words of one syllable: that's why people care about whether other people use memory safe languages.
Re:Criticizing Hare language approach for generic data struc... by Starlevel001 on Wednesday May 04, 2022 @10:09AM (#31260655)
All the while I have to use broken, unsafe software on a day to day basis I reserve the right to complain about things that make programs broken and unsafe
Re:Criticizing Hare language approach for generic data struc... by throw10920 on Wednesday May 04, 2022 @10:24AM (#31260871)
The vast majority of software that I use on a daily basis is broken because of logic errors and/or performance problems, not crashes due to memory unsafety. The former has nothing to do with memory safety, and the latter isn't solvable at all by programming language design.

I'm not saying that memory unsafety isn't a problem, but if you really want to make software better, you should address the biggest problems first.

Re:Criticizing Hare language approach for generic data struc... by pjmlp on Thursday May 05, 2022 @03:47AM (#31270713)
I personly don't, yet they land on hardware devices and servers I am not asked about, and have an impact on my digitial life.
Re:Criticizing Hare language approach for generic data struc... by samhw on Wednesday May 04, 2022 @09:20AM (#31259979)
> for code that’s supposed to be used in production it’s useless

Then ... don't use it. Others can use it and see what they learn from it, or even whether they find it productive to build stuff with. Even Brainfuck and Malbolge have devoted users who enjoy the challenges they pose, so I can promise you there's room enough in the world for this language. Let's just have some camomile tea and calm down a little.

Re:Criticizing Hare language approach for generic data struc... by HL33tibCe7 on Wednesday May 04, 2022 @09:59AM (#31260515)
Except maybe one day I'll be using some software written in Hare which will mess up and have negative implications for me.

Furthermore, it could be argued that our time could be spent more productively than on a language like Hare.

Re:Criticizing Hare language approach for generic data struc... by samhw on Wednesday May 04, 2022 @02:35PM (#31264185)
Then don't use that software. If you're right, software made with it will be worse - if even producible - and it won't take off. I'm sorry, but the ship has sailed: it is already possible to create bad software. The Hare language is not opening some hitherto-unopened Pandora's box. The same forces carrying good software to the top, and bad software to the bottom - and with them the tools used to make both the former and the latter - will continue to function.

As for whether our lives could be used better, well, let's leave that to each individual. I heartily encourage you to live your life as I do, worrying about what I myself am spending time on (currently: this inane conversation), rather than whether other people might be spending their own time in some supposedly-slightly-suboptimal manner.

Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Wednesday May 04, 2022 @07:02PM (#31266994)
For Christ's sake, you already use messed up software.

It is literally everywhere. Your kernel, your networking stack, your interpreters, your office suite.

Almost everything you use has some roots in C, a memory unsafe language that "messed up" and still became the most widely used language ever.

Software will always mess up, regardless of language it's written in.

Re:Criticizing Hare language approach for generic data struc... by turminal on Wednesday May 04, 2022 @09:31AM (#31260109)
What, in your opinion, does functional programming bring to the table for writing things Hare is designed for?
Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Wednesday May 04, 2022 @07:07PM (#31267037)
Clearly, it brings a warped perspective on how a CPU functions.

Do I really have to guess the order that my procedures are called? FP zealots say that I do.

Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @09:49AM (#31260361)
Same things it does for Rust.
Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Wednesday May 04, 2022 @06:54PM (#31266930)
Why do you feel the need to mention functional programming in a thread about a clearly structured, systems programming language?

What makes generics and functional programming style mandatory for any given language?

These things just add complexity and philosophy to a field that values pragmatic thinking.

Functional programming is not pragmatic. And neither are thusand ways to handle generics.

Re:Criticizing Hare language approach for generic data struc... by amelius on Wednesday May 04, 2022 @09:17AM (#31259958)
Not sure what you mean. Rust has no functional programming either ...
Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @09:24AM (#31260032)
Functional programming patterns are very common in Rust code. It doesn’t have automatic currying or higher-kinded types but it has generic associated types, anonymous functions, closures, and a rich set of collections with functional processing methods in the standard library.
Re:Criticizing Hare language approach for generic data struc... by capableweb on Wednesday May 04, 2022 @09:30AM (#31260101)
A lot of the standard library and an extensive part of the community ecosystem lives and breathes mutation at both the edges and in the internals, something people normally would avoid when trying to stick with functional programming. Sure, some mutation is always needed, but Rust wouldn't be the first language I'd pick if I want to focus on functional programming for sure.
Re:Criticizing Hare language approach for generic data struc... by jolux on Wednesday May 04, 2022 @09:48AM (#31260357)
No, but it’s widely acknowledged that functional programming features are useful even in imperative languages. Almost every imperative language that isn’t C, Go, or Hare has them. Java, C#, JavaScript, Python, Ruby. You should take a look at all the functions available on iterators in Rust if you haven’t. The Rust community tends to prefer using iterators to express things like looping when possible, which is a more functional style.
Re:Criticizing Hare language approach for generic data struc... by zozbot234 on Wednesday May 04, 2022 @09:39AM (#31260204)
Mutation within a single program flow is a well-known functional programming pattern, e.g. as supported by the ST feature in Haskell. Shared mutability is much harder to reason about, so is generally excluded and Rust implements it separately.
Re:Criticizing Hare language approach for generic data struc... by zozbot234 on Wednesday May 04, 2022 @09:36AM (#31260163)
Rust is a functional programming language, that's exactly what's implemented in the basic borrow checking rules. Interior mutability is added to that featureset, so as to support procedural programming with shared mutable state.
Re:Criticizing Hare language approach for generic data struc... by throwaway17_17 on Wednesday May 04, 2022 @10:42AM (#31261138)
I can not agree with Rust being a functional programming language. I don’t think it has NO functional style idioms, but the borrow checking does not make it functional. That would imply that the only characteristic of functional programming is some sort of ‘variable’ mutability constraint. I may not be up to defining functional programming by exclusion, I think any definition of functional programming includes things Rust does not have.
Re:Criticizing Hare language approach for generic data struc... by dgb23 on Wednesday May 04, 2022 @11:35AM (#31261957)
It borrowed some FP concepts, it's influenced by FP but it's definitely not an FP language. It's very much a language about imperative, explicit control. And that's a good thing for the use-cases that Rust targets.

It doesn't have in-built immutable data structures, most basic data structures and types are mutable and have mutate in place methods as their primary way of interaction. Struct fields being private by default is a dead giveaway (unnecessary in an FP language). Closures and functions are not the same thing and you cannot do much with them except calling them and passing them around.

I would rather describe it as an imperative language with lightweight OO (via traits) and some FP sprinkled on top. Note I'm not saying you cannot write FP code in it or that Rust doesn't have great unique benefits.

Re:Criticizing Hare language approach for generic data struc... by zozbot234 on Wednesday May 04, 2022 @01:57PM (#31263732)
> It doesn't have in-built immutable data structures

Immutable data structures by default would involve avoidable overhead, so that's why they aren't a built in. There are well-known crates that do provide persistent data structures in Rust.

> Struct fields being private by default is a dead giveaway (unnecessary in an FP language).

Data hiding is just as useful in functional programming; in particular, it enables you to expose an interface to data that stays valid under any isomorphism, while preserving desired invariants. Structs with generally accessible and updatable fields are a special case.

Re:Criticizing Hare language approach for generic data struc... by amelius on Wednesday May 04, 2022 @11:42AM (#31262062)
You can't do proper functional programming without garbage collected closures. There is a reason why Haskell has a garbage collector ... and it's not "the borrow checker wasn't invented yet".
Re:Criticizing Hare language approach for generic data struc... by zozbot234 on Wednesday May 04, 2022 @01:51PM (#31263655)
Haskell uses a garbage collector to enable closures to extend the lifetimes of values they capture within their context. You can do the exact same thing in Rust by using Rc or Arc, it just isn't required in most cases because the borrow checker can verify that the value is not outlived by the closure.
Re:Criticizing Hare language approach for generic data struc... by tayistay on Wednesday May 04, 2022 @09:50AM (#31260385)
This point has been made so many times that it gets tiresome. Perhaps that's ok, but it doesn't really tell us anything new.
Re:Criticizing Hare language approach for generic data struc... by darthcoder1010 on Wednesday May 04, 2022 @09:55AM (#31260454)
> 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...

Re:Criticizing Hare language approach for generic data struc... by HelloNurse on Wednesday May 04, 2022 @10:36AM (#31261048)
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.

Re:Criticizing Hare language approach for generic data struc... by darthcoder1010 on Wednesday May 04, 2022 @11:29AM (#31261876)
> 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]?"

Re:Criticizing Hare language approach for generic data struc... by HelloNurse on Wednesday May 04, 2022 @01:09PM (#31263178)
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).

Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Wednesday May 04, 2022 @07:13PM (#31267084)
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.

Re:Criticizing Hare language approach for generic data struc... by throwaway17_17 on Wednesday May 04, 2022 @11:47PM (#31269193)
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.

Re:Criticizing Hare language approach for generic data struc... by wheelerof4te on Thursday May 05, 2022 @03:26AM (#31270579)
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.

Re:Criticizing Hare language approach for generic data struc... by usefulcat on Wednesday May 04, 2022 @11:54AM (#31262202)
The author of the TFA isn't criticizing the language, he's criticizing a particular example, and he's claiming that hash tables are generally really useful.

In the example, maybe the static size of the table is fine, and maybe not being able to remove items from the table is fine, but unless maybe it's some sort of cache, it's almost never ok to assume that there will never be any hash collisions.

I mean, if you don't want to include hash tables in your language or library, fine, but using a bad example to attempt to justify it after the fact is.. not good.