News for hackers. Stuff that matters.
Re:Ask HN: Who regrets choosing Elixir? by dathinab on Saturday May 23, 2020 @05:13PM (#23286508)
Yes that. But also only use paradigms which the company can support.

For example good static typing is not just about adding type declarations but about taking advantage of the type system to the right degree. (Like don't ever overdo it, it's killing productivity most times).

But what degree falls into the productivity boosting spot and from which point on it will hinder productivity depends a lot on the team.

The problem often starts when the team changes and e.g. a pure scala/rust/C++/Ocml team get people cross entering from languages without any usefull static typing.

What had been reasonable and useful might now be a hindrance to the team!

I ran into a situation where this caused massive delay. (Well through the actual root cause was miscommunications, people not complaining about problems and instead trying to find ways to fix them behind the back of other people force pushing nice looking simple solutions which just happen to fail many edge cases, killed the write, refactor, test cycle and increase maintenance cost longtime :( )

So well 1st never overuse type systems. 2nd communicate problems, especially if you have problems understanding anything even if it just takes longer then you think it should.

Re:Ask HN: Who regrets choosing Elixir? by kiliancs on Saturday May 23, 2020 @07:59PM (#23287779)
Our adoption of TypeScript led to a significant reduction in defects, and it definitely isn't killing productivity. Most of the time we take advantage of existing types so if anything it speeds things up in the long run.
Re:Ask HN: Who regrets choosing Elixir? by dathinab on Sunday May 24, 2020 @08:43AM (#23291103)
You are misunderstanding what I mean. Through I haven't be to clear I think.

What I mean is code which not only uses types and takes advantage of the type system but overdoes it. In many languages with a powerful type system you can encode much more then just basic types and this is useful to reduce possible error cases. But if you overdo it the type system part becomes too complex, type error messages too unreadable and it hinders productivity and on-boarding.

I'm a big fan of static typing and believe that more encoding more constraints in the type system is _generally_ good. But if the resulting types become to complex it often not worth it.

Re:Ask HN: Who regrets choosing Elixir? by lxdesk on Sunday May 24, 2020 @05:53PM (#23295178)
I think I understand this one. I would restate it as "Powerful static type systems usually encode more constraints than you can easily reason about." And that's good(it catches your errors) and bad(you start to fight the compiler instead of solving the problem).

With simpler, more gradual designs like what are in Typescript or Haxe or even static, native-code languages like D, you have more escape hatches available, so you can iterate on the specification a few times and get code running quickly but also aim to make it tighter over time.

Re:Ask HN: Who regrets choosing Elixir? by dathinab on Sunday May 24, 2020 @06:07PM (#23295279)
No what I mean is not that it encodes more constraints than you can reason about, but that the way some libraries abuses the type system to encode some of the constraints can cause more problems then it solves.