[Grace-core] Minutes of Telecom 17-18.5.2012

Andrew P. Black black at cs.pdx.edu
Wed May 23 07:18:21 PDT 2012


On 23 May 2012, at 06:00 , James Noble wrote:

>>> 
>>> the big problem with the name "Nothing" is that in Grace you can write nothing*
>>> instead of a type - if you just leave the type out, you get type Dynamic* on inputs,
>>> or an inferred type on outputs.   But writing the world "Nothing" means something
>>> rather different than writing "" nothing.    See - it's even hard to write about!

This was my argument, but I'm not sure that it's sound.  One can, after all, say that "you have to spell out the word 'Nothing' with a capital N"

I agree that it seems to make a lot of sense to be able to write -> Nothing for a method that has an effect but returns no useful value.  The problem is that such a method does in fact return a value: it returns what Bart points out is usually called unit.   We have been resisting using that name because it makes no sense to novice programers.

>> 
>> I guess Void would also be a bad name, since in C-like languages, "void" actually means "Unit", not "Nothing" (in Scala terms). "Empty"? "NoValues"?
> 
> right.  NoValue? 

I do like Bart's idea of using the uninhabited type to signify no return.   Until last week, we had been calling the top and bottom types Any and None, Any being inhabited by all objects and None being inhabited by none.   I'm beginning to think that this was indeed the better choice.    Maybe we should use Nothing or Unit for the type with one element, and just deal with the difficulty of explaining it?

I also suggested that we use Uno as the name of this type, in a nod to multiculturalism reminiscent of entire in Algol 60 ;-)   One less character than Unit.  (I suppose we could go French and use Un, but that looks like the prefix un-).  I do agree with James that it makes more sense to spell-out the value of this type: unit or uno rather than ().

	Andrew




More information about the Grace-core mailing list