|
|
|
|
|
by rkrzr
3456 days ago
|
|
> Conversely, lack of mutability makes dynamic typing much easier to reason about. Dynamic typing does not imply lack of mutability. Those are unrelated concepts. Python and Ruby are dynamically typed but both are certainly mutable. Conversely static typing actually makes it easier to reason (locally or not) about things, since you always know the type of everything. |
|
I don't feel static typing makes it easier to reason about, at all. Reasoning about values and their transformations is more important to me than reasoning about types, and since values carry types you're actually working with more information. Most of the time the types I'm interested in are closer to concepts (sequences, mappings) than concrete classes.
Thats where having immutable dynamically typed values is better than having statically typed mutable ones.