Live data from Hacker News

Criticizing Hare language approach for generic data structures

ayende.com

101–110 of 272 posts

Re: Criticizing Hare language approach for generic data structures

#101
post #94

Earlier quoted context omitted.

That's a great way to make a program work only on specific distros.

Seems it fits Hare perfectly then, as one of the explicit goals of Hare is to only support non-proprietary OSes.

Why? Proprietary OS have package managers.

Re: Criticizing Hare language approach for generic data structures

#103
post #94

Earlier quoted context omitted.

That's a great way to make a program work only on specific distros.

Seems it fits Hare perfectly then, as one of the explicit goals of Hare is to only support non-proprietary OSes.

How is being free related to having a specific package in the package manager?

Re: Criticizing Hare language approach for generic data structures

#104
post #94

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's a great way to make a program work only on specific distros.

How so?

Re: Criticizing Hare language approach for generic data structures

#105
post #57

The primary reason I prefer working in C++ over C is that, for all of C++'s faults, it ships with a solid collection of containers and algorithms in the standard library. unordered_map may suck compared to other implementations, but it's a vast improvement over linked lists or home-grown hashmaps. Anyone can write a hash map, in the same way that anyone can write an HTTP server over a weekend. Doesn't mean it will be…

> it's a vast improvement over linked lists or home-grown hashmaps. One of the easiest things to do is write home-grown hashmaps that perform better than std::unordered_map. I suppose you have to worry more about technical debt / bugs, but yes home-grown hashmaps are feasible and I don't think std::unorderd_map is a "vast improvement".

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-designed, I'll take it.

The C++ containers are actually well-designed and performant so it's a no-brainer if you get to choose.

Almost forgot the type checking you get with C++. That's also a major factor.

Re: Criticizing Hare language approach for generic data structures

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

Re: Criticizing Hare language approach for generic data structures

#107

I don't get this guy. He's just raging. I agree a hashmap is not simple and Hare's post is a bit naive, but I don't get what's his problem with the language not providing a default implementation. It's part of the language's design. It's targeting people that most likely won't need a hash table. It's not aiming to be a high-level batteries-included language like Java.

[deleted]

Re: Criticizing Hare language approach for generic data structures

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

Not sure what you mean. Rust has no functional programming either ...

Re: Criticizing Hare language approach for generic data structures

#109

That reminds me that I had to reimplement basic hashmaps in C at least three times in my career. What a waste of time.

How much time did you waste?

I don't recall exactly, but at least a day each I would say? They were all performance critical, so had to put some effort. Two of them were for internal nginx patches, but were storing data a bit differently so code couldn't be quite reused. In languages with generics hashmaps are trivial to reuse with zero performance cost.
Post reply on HN