[Grace-core] Fwd: [important] Traits

Marco Servetto marco.servetto at gmail.com
Mon Mar 11 21:58:47 PDT 2013


>> - how dynamic do we want trait expressions to be?   The simplest answer, that has the least rules in the language
>>    is to make traits fully first class, and trait expressions fully dynamic.  But this will make static typechecking
>>    hard, and any kind of serious static compilation impossible.
I suggest we can discuss how I handle that in my thesis.
Yes, my thesis is on a nominal language, that change this quite a
while, still, I think incremental typecheching could be possible and
simple enough.

>> - then once traits are first class, why do we want factories?   Instead of making and passing around a factory
>> (one of the objects with a method that creates a trait), why not just pass around the class itself?
A "factory" if I understand correctly (and I will not call it factory,
since it get quite misleading)
is simply a method/function that returns a trait, so that lexical
scoping can do his job.


More information about the Grace-core mailing list