9 ms·
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 a
by socialdemocrat 4y ago
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.
- jolux 4y agoWe 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.
- amelius 4y agoNot sure what you mean. Rust has no functional programming either ...
- jolux 4y agoFunctional 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.
- capableweb 4y agoA 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.
- zozbot234 4y agoMutation 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.
- jolux 4y agoNo, 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.
- zozbot234 4y agoRust 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.
- throwaway17_17 4y agoI 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.
- dgb23 4y agoIt 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.
- zozbot234 4y ago> 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.
- samhw 4y ago> 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.
- HL33tibCe7 4y agoExcept 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.
- samhw 4y agoThen 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.
- wheelerof4te 4y agoFor 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.
- turminal 4y agoWhat, in your opinion, does functional programming bring to the table for writing things Hare is designed for?
- jolux 4y agoSame things it does for Rust.
- wheelerof4te 4y agoClearly, 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.
- capableweb 4y agoYou 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.
- rowanG077 4y agoHonestly 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.
- netr0ute 4y agoWhat's with this obsession about what other people do? You don't have to use a memory unsafe language, but others might.
- jolux 4y agoI’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.
- netr0ute 4y agoThe problem with this is that you're now the Ministry Of Truth of programming tools.
- jolux 4y agoYou'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.
- tayistay 4y agoThis point has been made so many times that it gets tiresome. Perhaps that's ok, but it doesn't really tell us anything new.
- wheelerof4te 4y agoWhy 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.
- HL33tibCe7 4y agoIf 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/ 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.
- lijogdfljk 4y agoAlso early on in the language seems a great time to respond to feedback. 3 years in when it has traction is terrible, heh.
- mariusor 4y agoSo what you're saying is basically: "he's asking for it", right?
- HL33tibCe7 4y agoThat's the point I make in the first paragraph, essentially. But the second paragraph is another reason.
- mariusor 4y agoDo 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.
- jmmv 4y ago> 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.
- sounds 4y agoBut why be the one to shoot it down? If the industry makes mistakes, that's not news.
- Shish2k 4y agoImagine 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?
- throwaway17_17 4y agoThere 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!
- darthcoder1010 4y ago> 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...
- HelloNurse 4y agoA 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.
- darthcoder1010 4y ago> 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]?"
- HelloNurse 4y agoEverybody 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).
- Atalocke 4y ago> 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 https://github.com/tristanisham/color
- usefulcat 4y agoThe 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.