Providing a Hint
←Older revision | Revision as of 13:46, 24 July 2012 | ||
Line 60: | Line 60: | ||
And that is all. Useful and simple to resolve [[dependency]] system for [[Java]] modularity has just been born. Heuréka! | And that is all. Useful and simple to resolve [[dependency]] system for [[Java]] modularity has just been born. Heuréka! | ||
+ | |||
+ | == Language Change == | ||
+ | |||
+ | So the problematic case is '''requires service'' constraint. We need to avoid its current form and always require a ''hint''. Here is my proposal how to do it: | ||
+ | |||
+ | <source lang="java"> | ||
+ | module M1 { | ||
+ | requires service S with default M2@1.6; | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | Not a big change, but it makes huge impact. The [[NP-Complete]]ness is gone. Whenever somebody wants to compile against module ''M1'', we also have to verify that the module M2 at revision 1.6 can be enabled. This is trivial polynomial check that can easily be done by [[JavaC]]. | ||
<comments/> | <comments/> |