• 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: July 11th, 2023

help-circle






  • Let me reverse this question and ask what is the benefit of dynamic typing? What is gained from vaguely defined objects?

    The purpose of typed languages is to ensure the bare minimum when it comes to safety. That when you’re accessing a field of an object that field is real, and that field is always going to be an int or a string.

    Try/catch only goes so far before it becomes way more cumbersome than necessary, as is checking every field of an object.

    Typescript is an example of a language that does static typing poorly, because by design it has to. It’s a quick bandaid fix over an inherently awful language.










  • Nim. It’s kinda hard to describe, but it just feels very clean. Makes me wish python had decent static typing and proper variable declarations. Though calling Nim a “compiled python” really doesn’t do it justice in the least. I have done some unholy things with compile-time evaluation and macros in this language, it’s so much fun.

    GDScript is also great. Fixes some of the gripes I had with python as well. Godot is also just a really good game engine so that helps.

    Python itself is also great. Has really good packages for almost any use and is really easy to just pick up and use. My main gripe is that it’s dynamic. Yes it supports typing, but it doesn’t make it any better when almost no libraries use it.

    Rust is neat, but I find myself hitting a wall whenever I try to pick it up again. I love the memory safety and type system, but it’s not the kinda language you can just pick up and play around in for a few minutes, you kinda have to have a project from the getgo to get any use out of it.

    C is fun just for the bullshit you can do with memory and pointers, but I find myself using rust or nim for anything that requires proper memory management.



  • In my experience, Nim is a language that you either fall in love with immediately or just try for a bit before going back to Rust or Python. My experience is the former, I absolutely love this language and I feel most people are missing out on it.

    Honestly I don’t really have anything to say about it other than it’s just a lot of fun to use. It’s got a great macro system, and the compile-time evaluation is the best, imo even better than Zig. It’s also got a large and comprehensive standard library, so for smaller projects you don’t really even need to use Nimble.

    But other than that, my love for this language is mostly just “I like how you write stuff and how that stuff works.” It’s a great language if you need to develop fast like Python, but run fast like C. It’s a language you can spend years learning the intricacies of, but pick up in a day. Nim was where a lot of programming concepts just clicked for me. It’s more than just a compiled Python, and I recommend playing around with it for a bit.