From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news4.google.com!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.freenet.ag!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sun, 28 Nov 2010 13:37:39 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Properties References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> In-Reply-To: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4cf24d13$0$6985$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 28 Nov 2010 13:37:39 CET NNTP-Posting-Host: 97041440.newsspool4.arcor-online.net X-Trace: DXC=>jkmNI[KfQaIkjb;<8iR=a4IUKei`PCY\c7>ejVhba3faFPBI3baGnnnfQU=lj X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15686 Date: 2010-11-28T13:37:39+01:00 List-Id: On 11/28/10 4:21 AM, Shark8 wrote: > I would like to submit a proposal for future Ada development; namely > "Properties." The purpose of this thread is to: 1) present the ideas > in general; 2) bounce ideas for the syntax off of fellow Ada users; 3) > work on presenting ideas to others; and 4) obtain the information to > submit the proposal. > Most of the suggestions seem to be about writing subprograms for access to a single object component. Just like @property in Objective-C is a shorthand for subprograms generated by tools. (Or C#'s or Python's sugar equivalent.) As such, an ASIS enabled Ada processor should be able to write these without too much effort. 1 - What is the benefit other than not having to write subprograms? Big win in standardized access to internal data of composite types? Or if that is: you can write additional code on assignment to a component, yes, I can do that now, too, with not much more effort. 2 - What if a property of an object needs to refer to two or more of its components? Say, a property's public view perhaps being much better presented as a Point rather than as forcing two Coordinate properties (even though Coordinates may have been chosen for internal representation in a record). 3 - Is there anything in properties that helps with order of component access? (Just an idea.) If Dmitry prefers giving the programmer control over basic language features such as defining what record and array should mean (within certain linguistic constraints), I'd prefer the removal of get/set centric programming altogether: I'm always the one to clean up after the practicalitists who just read and assign record components all across landscapes of objects, using get/set cotton candy. As an alternative, I'd suggest an option to remove definitions of full views of types from the specs.