Hacker News new | ask | show | jobs
by brightball 733 days ago
It does. Always has.

It just doesn’t have static types, it has strong types.

That difference gives you the flexibility to avoid circumstances where static typing can be a hindrance.

2 comments

Is it really strong typing if you can't type functions parameters and returns?
"Strong typing" most of the time means "no implicit type conversion" like e.g. C or Javascript do. That is indepentend of having statíc or dynamic typing (and anything between).
The thing is, low level types can already be inferred by the operators anyway. That’s what dialyzer does and it catches most things.

For the rest of it, you have a conversation where the benefits of full static typing don’t exist in a distributed environment. Example, you’re making function calls to other nodes in the cluster and the node is updated while your code is running potentially changing the function call. You won’t get the chance to do a contract exchange live with other nodes, recompile and examine results.

Instead, you have to pattern match on the parts you care about just like with an API call to a server you don’t control.

Even with Gleam, static typing only protects your node. In a distributed environment you can’t validate everything and on the BEAM everything is a distributed environment.

Once you accept this, you realize that the benefit of static typing simply doesn’t exist here.

... and misses all the occasions where static typing can be a benefit.