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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Sun, 29 Apr 2018 00:01:08 -0700 Organization: A noiseless patient Spider Message-ID: <87o9i2pkcr.fsf@nightsong.com> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87k1su7nag.fsf@nightsong.com> <87po2la2qt.fsf@nightsong.com> <87in8buttb.fsf@jacob-sparre.dk> <87wowqpowu.fsf@nightsong.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="2973c66b8467d5e5c38d149f2cdfa94b"; logging-data="29039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n+LL5uRWMhK4KqvTZHgNq" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:dvSDc3dTe6hRY97lmgXflUjHsPs= sha1:2JOKL8MgopVHofgXjfVVFqtlsmM= Xref: reader02.eternal-september.org comp.lang.ada:51775 Date: 2018-04-29T00:01:08-07:00 List-Id: gautier_niouzes@hotmail.com writes: > Of course (as in any language) you need to do some mental calculation > for choosing the right integer types. You occasionally need to use machine integers for performance or compact representation. The vast majority of the time that doesn't happen, so you can just use ordinary (i.e. arbitrary-precision) integers, which should be the default integers in any HLL. HLL is of course a nebulous and subjective term, but I remember one guy proposing that it meant that the default storage management is by garbage collected, and I'd add that the default integers are arbitrary-precision. So maybe it's circular reasoning, but by that notion, Ada is not an HLL. > In Ada you can use most objects on stack (this includes unconstrained > types); for those that need dynamic resizing you can use Vector's and > other containers using controlled types that do deterministic garbage > collection. Sure, that's like C++ smart pointers and containers. I'm familiar with the approach and it's nice for some purposes, but it still needs a lot of attention, and constrains your style quite a lot.