Live data from Hacker News

Criticizing Hare language approach for generic data structures

ayende.com

231–240 of 272 posts

Re: Criticizing Hare language approach for generic data structures

#231

"Bring your own datastructures" is likely one of the C carry-overs for Hare. If you think about many "classic" C applications, a lot of them basically only exist around/for one or a few data structures (e.g. most servers, many utilities etc.). In that context BYODS is somewhat defensible: If you don't care to implement the data structure, why does your application exist in the first place? But that's not "modern" app…

"Because C makes implementing generic data structures tedious. Is it a good idea to replicate that model?"

A lot of so called "modern" languages make a choice for you. Here is a hash map, over there is a class, have a tuple, set, etc. And they all have a specific way to be used.

In implementing all that, many languages lose on flexibility while gaining general utility. Hare seems to go in the opposite direction, one that makes programmers think hard about the solutions to their problems.

And that is, IMHO, a good thing.

Re: Criticizing Hare language approach for generic data structures

#232

Earlier quoted context omitted.

Easy to write, sure. But every time a developer has to look at it for the first time, they'll need to learn this hashmap's interface. Do I need to manage memory? Does it manage memory? How do I iterate? How do I add a new key space without thrashing the original implementation and making it twice as complicated? That's the biggest thing a standard interface gives you. Even if it's less performant and not well-designe…

> The C++ containers are actually well-designed and performant so it's a no-brainer if you get to choose. The STL doesn't allow the containers to be "well-designed and performant" other than std::vector which is trivial. People do what they can, but there just isn't much to work with because random coincidences about the data structures that were in mind at the time are enshrined in the C++ standard as API features.…

To be fair, if you ever rely on the default hash it's already safe to assume you don't care about performance. There's no good 'default' for all input.

Re: Criticizing Hare language approach for generic data structures

#233

Earlier quoted context omitted.

Correct me if I'm wrong, but Hare doesn't say "we need no package manager" but instead "we don't need a new package manager, use the one your OS provides", at least from how I understand it.

That strikes me as another C-ism that didn't deserve to be carried forward into a 21st century language. There's a reason we call it "dependency hell" and not "happy fun fussing with dependency version conflicts among projects that are completely unrelated except that you happen to be using the same computer to work on them time."

That is on the library developers to settle out. Keeping your library API stable requires the mind of a genious and discipline of a monk.

Now, keeping your language design stable and backward-compatible is a no brainer. Given that, it's possible to handle "dependency hells" simply by building from source.

Hare is designed to be ultra conservative, so you don't have to worry about dependency hells. Features are in code, not builtin into the language.

It is a win-win situation.

Re: Criticizing Hare language approach for generic data structures

#234
post #110

Earlier quoted context omitted.

How so?

Because you can't guarantee that every distro's package manager will have the packages you need.

Build them from source, then.

Hare is a systems programming language. What kind of a systems programmer doesn't know how to build from source?

Re: Criticizing Hare language approach for generic data structures

#235
post #208

Earlier quoted context omitted.

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 continua…

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 progres…

"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 structures

#236
post #106

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…

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.

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 structures

#237
post #47

Earlier quoted context omitted.

Quoted post unavailable.

I have no fists in this fight, but wanted some clarification. Are you saying the reason Rust is now being integrated into the Kernel instead of Golang is because of the success of evangelists, not because of the merit of the language itself? I'm not involved in Kernel development myself, but if I was, I'd see your statement as a big hit in the face that we don't know what we're doing, if they (Kernel developers) are…

I must admit, I am still surprised to see Rust gaining acceptance when the reasons Linus gave in 2010 for rejecting C++ in the kernel appear to apply to Rust equally well. I can't think of any of the pragmatic points which he raised which doesn't apply to Rust.

For example, the arguments against namespaces and function overloading, high context dependency, easy of understanding and in favour of C's simplicity in general.

My guess (it's just a guess) is that his position has shifted over time to consider a higher-abstraction, higher-complexity language, as development methods and the complexity and professionalising of the kernel have changed since then.

Re: Criticizing Hare language approach for generic data structures

#238
post #111

Earlier quoted context omitted.

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

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.

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 structures

#239
post #106

Earlier quoted context omitted.

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.

What, in your opinion, does functional programming bring to the table for writing things Hare is designed for?

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 structures

#240

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…

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

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.

Post reply on HN