philm

joined 1 year ago
[–] philm 5 points 1 year ago

Drew Devault’s Hare language

Ok, they say "use your distros package-manager", that's basically asking for the same disaster as C or C++. I think cargo is one of the selling points of Rust.

At least say something like we use "Nix" for default package-management (which does a lot of things right)...

[–] philm 2 points 1 year ago* (last edited 1 year ago) (1 children)

I think it's not that bad yet, when comparing with npm. Usually the dependencies I use are of very high quality. But I'm also very selective with dependencies. I'm rather writing a simple part myself, than using a not-really maintained low-quality dependency...

Btw. I have not looked into the Hare language yet (will do that now), but if it's similar as deno, I won't like it. You want to have some kind of package management IME...

[–] philm 3 points 1 year ago (2 children)

Not him, but I much more like the type-system of rust (e.g. enums).

[–] philm 3 points 1 year ago

Yes, and Rust with incremental compilation is pretty fast to iterate as well, as long as you don't use massive libraries/build-scripts etc.

[–] philm 3 points 1 year ago

Yeah the strict type-system of Rust is great at finding issues.

I think when understanding, that bash is basically only programs with parameters ([ is a program that takes all kinds of parameters and as last parameter ]) then bash is quite ok for stuff that doesn't need a lot of algorithms, i.e. passing the in and out from one program to another. But as soon as there's basic logic, You'll want to use a fully-fledged programming language.

Also the maintainability aspect: You can just start using fancy stuff you never want to use in bash and it can slowly grow into a library or application or something like that.

Btw. I have started a syntax-sugar library/crate that creates typing information for all kinds of programs via the builder-type-state-pattern, so that you don't always have to look up man etc. and that it should be more convenient to execute programs (not open sourced yet, and low priority for me as I'm working on various other exciting projects currently)

[–] philm 3 points 1 year ago

Yeah as weird as it sounds to use a "low"-level systems programming language such as Rust. Rust works surprisingly well as "script" language. (And you don't have to deal with the ugliness of bash, admittedly though, that bash is quite a bit more concise when using a lot of program executions and piping the results etc.)

[–] philm 3 points 1 year ago (1 children)

It has Properties (basically syntax sugar...)

[–] philm 1 points 1 year ago (3 children)

I'm totally aware of the benefits of encapsulation, but the way java does it seems so unnecessarily boilerplatey (C# is better, functional programming makes encapsulation even simpler, but that's a different paradigm...)

I like how Rust approaches this via the module system and crates (you have pub for the public interface, pub(crate) for crate/lib wide access and no modifier for being only allowed to access in the current module and submodules of that module)

[–] philm 1 points 1 year ago (1 children)

My condolences, haha (I'm honestly not a big Java lover ^^).

[–] philm 3 points 1 year ago (5 children)

Yeah but why do I have to use an IDE to generate getters and setters in the first place? It just adds up to more mental overhead, because my brain has to process this boilerplate somehow, even if my IDE can generate it (I know it's simple code, but it's even simpler to not have that boilerplate code at all).

[–] philm 3 points 1 year ago

Yeah the way you need to maintain two codebases: one for types and one for actual logic is annoying.

Also nix is purely functional (which is necessary, for more information read the Nix Pills), Typescript is not, so unless it's only a purely functional subset or severely limits Nix (in the form of abstractions, after skimming over it, I think this is the case), it will run into issues...

[–] philm 1 points 1 year ago (10 children)

The curse of OOP (java style...).

I mean why do you need to write getter and setter methods. I have wondered at the beginning of university 10 years ago, and am still wondering why you would need something like that...

view more: ‹ prev next ›