[Grace-core] Immutability in Grace

James Noble kjx at ecs.vuw.ac.nz
Wed May 21 23:56:30 PDT 2014


>> var x :  Foo is immutable
> That is an annotation on the var declaration itself.

is it?  oh well something else for when we fix the grammar...

I guess the question is, do we want to distinguish: 

var x is immutable : Foo

var x : Foo is immutable

var x : (Foo is immutable) is logged
(or some other annotation) 

>>> As far as I can tell, neither approach would be able to make any deductions about the purity code without the help of the user, since there is no simple way of knowing (especially with the foreign C modules) whether data will be modified or not.
> C code is always going to be able to do what it likes, so there's no
> use worrying about it. If it breaks things then it's what's broken.

absolutely! 

James


More information about the Grace-core mailing list