Banjo

52 thoughts
last posted Nov. 9, 2015, 7:13 p.m.

50 earlier thoughts

0

Type should not change the meaning of expressions

In Scala, types often change the meaning of something. For example, if you assign a expression into a lazy method parameter it's automatically made into a thunk. If you call a method that takes no parameters, the parens are optional. I think this is a bad idea ... it's extra complexity.

In Haskell, too, the static type environment is used to resolve type-class invokations. This includes the expected target type of the expression. I think this is a lot of complexity to consider when reading code - you have to not only know the type of an expression, but also the type expected of that expression by whatever it is being passed to.

In Banjo I want to keep it relatively simple. There's no overloading based on static parameter types or return types, only the actual runtime value matters for resolving a slot value, just like in Javascript and other dynamic languages.

1 later thought