• 0 Posts
  • 429 Comments
Joined 1 year ago
cake
Cake day: September 27th, 2023

help-circle





  • … and yet… it lacks clear and enforced type restrictions which help with clear code contracts. It’s certainly better than Javascript but the lack of runtime enforced type checking can force defensive programming in an unnecessary manner.

    Your statement isn’t strict type checking. It’s a restricted form of type coercion. Given how common this feature is in other languages it’s weird that pythonistas feel so defensive when discussing the feature. I enjoy strict type checking, but that’s my opinion - it makes it a poor choice for the sorts of projects I work on but if it’s good for you then enjoy!












  • A bit of context, I maintain a small laundry list of open source utilities I’ve built up over time… when I want to try out a new language I just take one of my libraries and convert it into the new language. I’ve found that generally does a good job of highlighting language shortcomings and specialties (especially since my packages lean heavily on syntactic sugaring) while also giving me an end product I can run up against a nice suite of robust tests.

    I might suggest finding a small (like a dozen source files tops) library you like and just converting it into the new language as you’ll be forced to deal with more serious problems than a toy project while also potentially producing something useful on the far side.