News for hackers. Stuff that matters.
Re:Elixir v1.7 released by dnautics on Thursday July 26, 2018 @05:06AM (#17616076)
> why this has been down voted

static typing is somewhat of a programming religious wars. I mean sure, extremely weak typing is IMO horrible (python, ruby, js, I'm looking at you) but being dynamic does mean that quickly testing out an alternative code path. Just today I realized I needed to forward some information to a somewhat polymorphic data structure, a process which I hadn't planned for, I found a map structure that is encapsulated state in a gen_server in exactly the right place, so I just shoved it into the map under a new key. That is effectively breaking what could have been a static type system. And it was two lines of elegant code, no refactoring necessary, and probably a line of documentation saying that in this corner case the structure will contain this extra info.

IMO the right approach is compromise. You could do this in a statically typed system by just making everything a map... which is effectively what the BEAM languages do, but at least there's a type analysis tool that can introspect deep into the built in "flexible" types.

Re:Elixir v1.7 released by erikbye on Thursday July 26, 2018 @07:27AM (#17616567)
Python and Ruby are not known for "extremely weak typing".

Ruby: duck, dynamic, strong.

Python: dynamic, strong.

JavaScript: dynamic, duck, weak.

Elixir: dynamic, strong.

https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic...

https://en.wikipedia.org/wiki/Strong_and_weak_typing

Re:Elixir v1.7 released by bostonvaulter2 on Thursday July 26, 2018 @11:48PM (#17623305)
I think the idea is that pattern matching and guards give you some additional guarantees above normal "strong typing". But I do agree with you.