We can go further, I think it’s impossible to prevent memory leaks in a general purpose language
We can go further, I think it’s impossible to prevent memory leaks in a general purpose language
The Elm compiler
Lmao, what the heck. I’ve heard about that, but I still cannot believe it’s true.
Yeah, I changed my career direction (industry, tech stack…) but before that, my CV only was enough for me to get hired. They would just verify the information, and sometimes, there weren’t even a single tech interview.
I was so lucky in the interview for my current job: I’m working on a product with a big networking component, and I was asked to write an echo server with low level components. That was maybe the second time I had a test related to the job.
It’s much easier to work with streams of untyped data in a weakly typed language.
I really like this instance, so of course I’m 100% for the move
While you’re at it, with sum types, you can replace this stupid nil with an optional type. Also, you can replace the stupid error handling with an either/result type. Then you can add a keyword to return early if it’s left/err. Then you have Swift or Rust.
I don’t like/use the class
keyword in JS, because I quite like the paradigm with prototypes & stuff, and that keyword tries to make it fit into a totally different paradigm, which doesn’t really work IMHO.
With TS, I find it even more useless, because I can use TS as a functional language, with POD, functions and interfaces only. I’ve written entire projects without ever using and needing this keyword, which is a proof IMHO that it’s an unnecessary addition. Not sure how unpopular is my opinion tho 😅
BTW, I’ve developped a few strats to have my own style in TS that I like quite a lot. I can tell more if you’re interested.
And here you’re only talking about a subset of memory leaks, by inaccessible memory. You can also leak memory by pushing new elements in a channel while never reading them for example.