Earlier quoted context omitted.
I question the assertion that Hare's standard library is "anemic"; it includes a pretty decent set of batteries for many use-cases: https://docs.harelang.org Many Hare programs will not need to have dependencies at all. We encourage a more conservative approach to dependencies than is common in many modern languages such as Cargo, PyPI, npm, Go, etc. Even dependency-heavy Hare projects will not have hundreds of depen…
That does look like a decent collection of functionality, but a HashMap as mentioned in the submission seems like a pretty glaring omission. I can't remember the last time I wrote a program that didn't use a Map. Even dynamic languages that tend to be quite light on types almost universally include a map type. I can definitely see the problems with the Node "explosion of modules" approach, but if we're looking at fix…
Criticizing Hare language approach for generic data structures
91–100 of 272 posts
Re: Criticizing Hare language approach for generic data structures
#92Earlier quoted context omitted.
Are you suggesting there aren't mature implementations of hash maps in C you can easily vendor?
What does “vendor” mean in this context? Is it just a synonym for “distribute”?
I believe the name comes from a tradition of putting such code in a directory named vendor/name-of-library or vendor/name-of-vendor/name-of-library which allowed for distinguishing between the src directory which was first-party code and the vendor directory which contained code form 3rd party vendors (often such code was proprietary and had to be bought/licensed).
Nowadays the term is used to differentiate between a manual approach and the use of a package manager.
Re: Criticizing Hare language approach for generic data structures
#93Earlier quoted context omitted.
There's a mature open source library for them packaged for Arch and other distros. Using that would be less work than trying to implement it from scratch.
Are you suggesting there aren't mature implementations of hash maps in C you can easily vendor?
Re: Criticizing Hare language approach for generic data structures
#94Earlier quoted context omitted.
BYOD combined with "we don't need a package manager" sounds like a particularly bad combination. I understand Rust's "small stdlib but great package ecosystem", but whats the appeal of "anemic stdlib plus no package ecosystem"? Maybe I would come up with something like this if I only ever worked on Linux software using C, but outside those niches these choices seem weird.
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.
Re: Criticizing Hare language approach for generic data structures
#95Earlier quoted context omitted.
Even in the embedded world, it’s becoming less justifiable to use C when your platform supports rust.
rust doesn't offer much value for embedded (mcu, bare metal, tiny stuff) imo. No allocation = no leaks, no use after free, no dangling pointers. No multi core = no atomics or concurrency to worry about. Ring buffers solve 99% of my interrupt data sharing = no need to worry about synchronization. Bounds/safety checks? Need to run and test release builds most of the time because of space/memory constraints.
- The package management is a nice. Install a generic ring buffer or a board support package for the hardware you are using.
- Async-await can be really nice for dealing with hardware peripherals.
- Don't interrupts constitute concurrency?
- Reduced UB and footguns compared to C
Re: Criticizing Hare language approach for generic data structures
#96Earlier quoted context omitted.
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…
Its not existing kernel devs that suddenly switched to rust. It is the incoming cohort.
Re: Criticizing Hare language approach for generic data structures
#97Earlier 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.
Re: Criticizing Hare language approach for generic data structures
#98Earlier quoted context omitted.
Are you suggesting there aren't mature implementations of hash maps in C you can easily vendor?
What does “vendor” mean in this context? Is it just a synonym for “distribute”?
Based on my long builds times and erratic network behavior in CI I'm beginning to think every system should just vendor.
Re: Criticizing Hare language approach for generic data structures
#99I 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.
I think that even the mere fact that there are a billion implementations of a hashmap kind of implies that a hash table _is_ a simple data structure, that you may complicate in a bazillion ways in order to cater for some specific usecase / requeriment. But at it's core, a simple data structure.
Re: Criticizing Hare language approach for generic data structures
#100He 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.