Return 'this' proposal
develop4lasu at gmail.com
Tue Mar 17 15:09:30 PDT 2009
2009/3/17 Joseph D. Darcy <Joe.Darcy at sun.com>
> This 'this' proposal remains vague and imprecise.
> Including this type/self type in a language is a continuing area of study;
> for example, see the recent paper
> "Matching ThisType to Subtyping," Chieri Saito and Atsushi Igarashi, Kyoto
> University, Japan, ACM SAC 2009.
> There are open bugs requesting this capability. For example typing "site:
> bugs.sun.com this type" into a popular search engine quickly yields,
> amongst other hits,
> 6479372 Add self types (type of 'this' aka ThisClass) to the language
> This bug discusses the size of the type system impact of this change, a
> magnitude far too large for Project Coin.
> There is no need to submit further refinements of this idea; any proposal
> along the lines of adding a this type will be out of scope for Project Coin.
> I'll check it, but I'm afraid that introducing 'This' type will be
impossible for Java and for all other languages with Inheritance, or I would
say it's possible but conditions would be huge.
- Idea is quite simple: you use object from left side of dot as returned
from method, it's the same quite idea with converting void -> this, but
allowed only when it's written directly.
- Byte-code for that is other story and I'm not sure how much limitation
Maybe you cold while what problems you see (that could help)?
Pozdrowionka. / Regards.
Lasu aka Marek Kozieł
More information about the coin-dev