[Grace-core] On Gradual Typing

Kim Bruce kim at cs.pomona.edu
Thu Jul 18 16:08:41 PDT 2013


>>> 
> 
> I haven't.  In fact, in the GUinit code, I suggested defining timesRepeat as a method on numbers, as in 
> 
> 	r.timesRepeat { doSomething} 
> 
> I agree with Kim that we should not use the same method for the two cases.
> 
> In teaching, providing the wrong number of arguments is a common error.  So we should design the language to give as many warnings about this as possible.
> Perhaps this was the reason that Kim was opposed to allowing overloading by arity?  

Yes, we should be looking for ways to detect common student errors, and leaving out an argument (or writing them in the wrong order) is a common mistake.  It's worth noting that Python gives errors if the wrong number of arguments are provided to a function.

> 
> 	Andrew
> 
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core



More information about the Grace-core mailing list