[RSL] RSL update
daniel.smith at oracle.com
Fri Jul 6 22:26:39 UTC 2018
> On Jun 26, 2018, at 6:09 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
>> Here are two more arguments in favor of language-level stripping:
>> 1. Strings inside annotations aren't left out. Whenever an annotation attribute feels like something users may want to use an RSL for, the best we can hope for (if we don't have automatic unindenting) is for the specification of that attribute to say "consumers of this data really should call .align() on this" - quite unsatisfying, and we can be sure most annotation specs won't bother.
> This seems like a pretty corner^3 case to me; long strings in annotations are kind of questionable already, multi-line strings in an annotation seem even more so, and in those cases where you absolutely need to be divorced from the incidental indentation, you could just align it yourself correctly, at the cost of uglier indentation (or pull it out into a static var.)
Just to be clear about dependencies: "pull it out into a static var" only works if the 'align' call is a constant expression. Which it ought to be, yes, but that's a separate feature we'll need to deliver.
(And really ought to, I think. Otherwise, if we anticipate some releases in which 'align' calls disrupt what would otherwise be constant expressions, that's a notable argument in favor of the language approach.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amber-spec-experts