• 0 Posts
  • 77 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle




  • True, Python has a very big userbase and a lot of cool libraries and is nice to quickly hack something together.

    Though the title of the post is

    If you had to choose one programming language that you had to use for the rest of your life, what would it be?

    So TMU I want to predict the future in a way that it positively affects me, and find a language that fulfills this role best (throughout the stack, so that I’m not limited). And honestly I wouldn’t want to touch Python with a long stick, if the project is moderately complex (and isn’t easily off-loadable to native libraries that Python builds upon) and say > 5000 LOC, the super dynamic nature of python is a curse in this regard.





  • Yep this sums up my experience quite well too.

    I want to emphasize two things here:

    • Learn reading code (by reading code…) of high quality open source projects. It helps getting new concepts and actual creative coding patterns for concrete problems (unlike learning all these “design patterns” in books that IMHO are often just boilerplate generation (hard take I know…)).
    • Start coding (open source) projects, especially challenging ones, and keep pushing your limits, by trying to learn new smart things, how to achieve problem X. I stagnated in my workplace for quite some time, got unhappy (around COVID), scaled down working hours significantly (I have quite a spartan life, so I can fortunately afford it), and am coding a lot more open source since then. I think I almost learned more in the last 2-3 years until at least to the years of university (quite some time ago), maybe even more than in university, and have a lot more fun while coding. I think going in depth with a programming language comes automatically, when the project is fancy enough, I learned a lot of limitations of Rust (and thus basically reached the deepest level of (parts of) the language) while designing smart APIs.


  • 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…




  • 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)




  • 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)