News for hackers. Stuff that matters.
Re:Things I Was Wrong About: Types by withinboredom on Sunday September 27, 2020 @11:55AM (#24607574)
> The thing was 50 lines, and I was lost.

The key to writing type-less code is making it so simple that you could cry. Avoid being clever at all costs. However, it's almost the exact opposite when you have a nice compiler checking everything, you can be mighty clever and know that it will work.

I'm lucky in that we can solve a problem in a myriad of languages, depending on if it needs to be "realtime", or can be precomputed. There are some types of problems I'd rather solve in Scala, and others, Python or PHP. It just depends.

Re:Things I Was Wrong About: Types by loup-vaillant on Sunday September 27, 2020 @06:39PM (#24610757)
> The key to writing type-less code is making it so simple that you could cry.

I can't help but interpret this as "the key to writing type-less code is choosing problems so simple that you could cry". In other words, dynamic typing doesn't scale.

When I have a very simple problem to solve, sure, I won't mind dynamic typing. For anything worth more than an hour of coding however, I'll definitely reach for more reliable tools.

Re:Things I Was Wrong About: Types by musingsole on Thursday October 01, 2020 @02:01PM (#24654140)
You can look at it that way, or you could look at it like comparing RISC vs. CISC architectures. RISC would seemingly be too simple to accomplish everything CISC does but that's the beauty of being Turing complete.