Why have both switch and match statements?
The Hare programming language
251–260 of 323 posts
Re: The Hare programming language
#252Earlier quoted context omitted.
I never said it wasn't the biggest deployment target. I also think it's shortsighted to do this. > you are not doing yourself any favors by not developing on the same platform as your deploy target Why would I give up all the tooling I already have, such as an VS, to "do development on Linux"? Have you tried doing development from Visual Studio, VSCode on windows where it targets WSL? It's seamless and I don't really…
You can do that exact setup just fine with Hare only being able to compile for Linux (or FreeBSD). Providing a Linux runtime environment to run code that targets Linux is WSLs whole purpose .
> code that targets Linux
This is too big of an assumption to make. For instance, the last company I worked for does contract with DOD where output of the project is two installers for windows an macOS, despite the product working flawlessly on Linux.
The is a HUGE world out there where your deployment targets won't be Linux servers, and this is a huge blind spot for a mainstream want to be language.
Re: The Hare programming language
#253Earlier quoted context omitted.
You can do that exact setup just fine with Hare only being able to compile for Linux (or FreeBSD). Providing a Linux runtime environment to run code that targets Linux is WSLs whole purpose .
And here is the entire problem. > code that targets Linux This is too big of an assumption to make. For instance, the last company I worked for does contract with DOD where output of the project is two installers for windows an macOS, despite the product working flawlessly on Linux. The is a HUGE world out there where your deployment targets won't be Linux servers, and this is a huge blind spot for a mainstream want…
Re: The Hare programming language
#254Since the language is officially announced now, here's an interesting analysis on the language: https://tilde.team/~kiedtl/blog/hare/ Personally I'm very interesting in playing with it. Generics, functional programming constructs, and a lot of the syntactic sugar you find in modern languages have their uses but I think there's a lot of merit to the idea that you might not want them in a systems language. I think clea…
> Labeled loops > I'm not yet sure whether this is a good thing or a bad thing. Sure, you can do clever shenanigans now, but something tells me this will make the code's control flow much harder to follow. The most popular example I can think of is JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Tbh, I think the opposite is true: without the ability to break outer loops, I have resorted to…
I don't know for sure, but I believe the JavaScript feature was inspired by Perl, which has had them since at least the v4 releases (1989-1993):
Re: The Hare programming language
#255Will wlroots move to hare? Or will bindings be written and maintained?
I have no plans to do either. I can't see wlroots being rewritten, but I could see someone writing bindings for it. Hare does not make C obsolete, there's no reason to rewrite old code imo.
Re: The Hare programming language
#256Earlier quoted context omitted.
And here is the entire problem. > code that targets Linux This is too big of an assumption to make. For instance, the last company I worked for does contract with DOD where output of the project is two installers for windows an macOS, despite the product working flawlessly on Linux. The is a HUGE world out there where your deployment targets won't be Linux servers, and this is a huge blind spot for a mainstream want…
Nobody ever said it wanted to be mainstream. It targets a niche, quite blatantly.
Re: The Hare programming language
#257Not supporting Windows and macOS will likely hurt the adoption of the language. Anyway, is it possible to target bare-metal with Hare? Is it possible to use it without the standard library?
> Not supporting Windows and macOS will likely hurt the adoption of the language. Not among our target audience it won't. > Anyway, is it possible to target bare-metal with Hare? Is it possible to use it without the standard library? Yes. Here are two kernels written in Hare that don't use the stdlib: https://git.sr.ht/~sircmpwn/helios https://git.sr.ht/~yerinalexey/carrot
No gamedev?
Re: The Hare programming language
#258I see that Hare exposes itself via the hare module in stdlib. Is there any plan for metaprogramming/macro (not preprocessor) in Hare?
No, there are no plans for first-class metaprogramming. The purpose of exposing the parser, type checker, module system, etc, in the standard library is to allow for users to more easily build custom Hare tooling. The closest thing you could get to metaprogramming with this is some assistance with code generation.
Re: The Hare programming language
#259Re: The Hare programming language
#260Earlier quoted context omitted.
You are missing one subtle but important flaw in your dismissal: not self-hosting means that your compiler will only be developed by people willing to write C/C++ code, which has practical implications as well as taking away some of the punch from your effort to improve on the status quo.
Self-hosting will only distract you from any "effort to improve on the status quo". And, do you really want people working on your compiler who can't even cope with C++? (BTW: There is no such language as C/C++. Clang and Gcc are both coded in C++.) Your new language desperately needs libraries that bring it up to a level of practical usefulness. A compiler front end is about the least-useful code you could write in…
That's the whole point of creating a new programming language.