Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352143 - [xtend] Add cached results for methods
Summary: [xtend] Add cached results for methods
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 13:21 EDT by Karsten Thoms CLA
Modified: 2017-09-19 17:31 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2011-07-14 13:21:28 EDT
When having complex result computations in a method it would be good to mark a method as "cached", similar to "create", but without the need to create a result object.

This could look like this:

def cached computeSomething () {
}
Comment 1 Sebastian Zarnekow CLA 2011-07-15 03:44:33 EDT
This feature was already discusses in the past and we decided to not built some caching mechanism into the language.

Xtend allows to define fields which in turn allow to inject / use own caching services with fine grain control on the cache-lifecycle / -semantics / -implementation on the user side. 

Please feel free to reopen if I missed your point.
Comment 2 Karsten Thoms CLA 2011-07-15 05:45:45 EDT
In this case the Xtend library should provide a useful set of caching extensions, since it is likely that users want to enable field based cachings bound to the lifecycle of the class instance. If the user wants to implement own semantics, he would be free to add his own implementation, of course. But I guess the at least 90% case is per-instance, like the create method scope.
Comment 3 Sebastian Zarnekow CLA 2011-10-17 17:17:56 EDT
I don't think that such a caching extension is in the scope of the xbase lib or xtend lib. Therefore I'd like to close this ticket as won't fix. Any objections?
Comment 4 Sven Efftinge CLA 2011-10-18 02:10:44 EDT
Agree.
Comment 5 Karsten Thoms CLA 2017-09-19 17:19:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:31:07 EDT
Closing all bugs that were set to RESOLVED before Neon.0