Earlier quoted context omitted.
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.
What's with this obsession about what other people do? You don't have to use a memory unsafe language, but others might.
Criticizing Hare language approach for generic data structures
251–260 of 272 posts
Re: Criticizing Hare language approach for generic data structures
#252Earlier quoted context omitted.
Configuring pins and peripherals with code is a chore, I use graphical tools for that. But C has no problems abstracting away peripherals, just hide the register bits in a private TU and expose i2c_init(), i2c_write(), etc.
> just hide the register bits in a private TU and expose i2c_init(), i2c_write(), etc. That's not a zero cost abstraction, unless these "functions" are actually provided in an include file. Embedded programming is often performance sensitive, so this can matter.
Re: Criticizing Hare language approach for generic data structures
#253Earlier quoted context omitted.
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?
Having to download several dependencies from random websiees and install them is not the most fun way to spend an afternoon. Especially if half of them have cryptic build errors.
I think that Hare's workflow and usecase encourages having very few or no dependencies.
That means, in most cases, you should just be able to download a project's source, build and use it right away.
Re: Criticizing Hare language approach for generic data structures
#254Earlier quoted context omitted.
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?
So the solution is just vendoring? Vendoring is very clunky—that's why we have package managers in the first place.
Hare does the smart thing - it decouples the library distribution model from the language.
After all, it's the programmers job to make sure that distribution and packaging of his/her library is as simple as possible.
Re: Criticizing Hare language approach for generic data structures
#255Earlier quoted context omitted.
"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…
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.…
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 structures
#256"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…
Rust and Go seemed to initially want to target C programmers [1], but ended up capturing users from higher level languages – even Python and such – who wanted better performance and more control, because they had so many affordances. Hare clearly isn't like that: it's _actually_ aimed at (FOSS) C programmers, almost stubbornly so, and isn't going to appeal to many others. But for those people I can see C-with-tagged-…
Re: Criticizing Hare language approach for generic data structures
#257Earlier quoted context omitted.
> “go but with ownership and borrow checker” Wouldn’t this be just a lesser version of rust then? If someone makes a new language and wants it to catch on, it needs new ideas. Not just nice simple syntax mixed with something someone else is already doing.
> Wouldn’t this be just a lesser version of rust then? That depends if you consider C++ an upgrade over C :) Many flamewars have been had on this topic and i think it's just a matter of personal taste. I'm firmly in the less is more camp.
Re: Criticizing Hare language approach for generic data structures
#258Earlier quoted context omitted.
So what you're saying is basically: "he's asking for it", right?
That's the point I make in the first paragraph, essentially. But the second paragraph is another reason.
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 structures
#259Why 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…
> 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,…
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 structures
#260Earlier quoted context omitted.
So the solution is just vendoring? Vendoring is very clunky—that's why we have package managers in the first place.
Language designers have every right to avoid complex features if such a feature impede the language in any way. Hare does the smart thing - it decouples the library distribution model from the language. After all, it's the programmers job to make sure that distribution and packaging of his/her library is as simple as possible.