Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: enhance an array's static type by a lower length-bound. References: Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 18 Aug 2011 18:12:54 GMT Lines: 23 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1313691174 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7221 Joshua Cranmer wrote: > On 8/18/2011 8:14 AM, Andreas Leitgeb wrote: >> Joshua Cranmer wrote: >>> On 8/17/2011 10:04 AM, Andreas Leitgeb wrote: >>>> I believe such a change would be source-compatible, but might require >>>> some severe changes at the bytecode/class-file-format level, to allow >>>> to specify such a lower bound in a type signature. Such a change should >>>> be possible in a way, that old class-files can still be used. e.g.: >>>> get9th:(]10I)I (currently without bounds: get9th:([I)I ) >>> You could do it by adding a few new annotations, >> I must admit, that I've so far mostly ignored Annotations for my >> tasks. When you write "adding a few annotations", do you just mean >> adding certain standard annotations to the respective places, or did >> you mean defining a custom Annotation and write some code for a >> compiler-plugin that would then deal with one's new Annotations? > I was actually referring to class file annotations, not Java annotations. They are called "annotations", too? I thought, they were called "attributes". But anyway, yes, that might also be a way to implement it. (That's also, how signatures of generic methods, etc. are handled)