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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-09 21:59:40 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sf.pbi.net!64.42.15.2!HSNX.atgi.net!sjc-peer.news.verio.net!news.verio.net!sjc-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: constants v variables (was Re: if statements) In-Reply-To: Message-ID: References: <3A02CED4.520C2768@brighton.ac.uk> <3A078B6F.D34B024B@erols.com> <8ua3m1$bru$1@nnrp1.deja.com> <3A09A39F.2822C01B@cepsz.unizar.es> <8udce8$1qi$1@nnrp1.deja.com> <3a0a6f6c$1@pull.gecm.com> <87em0ley6l.fsf@deneb.enyo.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 10 Nov 2000 05:59:46 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sjc-read.news.verio.net 973835986 206.184.139.136 (Fri, 10 Nov 2000 05:59:46 GMT) NNTP-Posting-Date: Fri, 10 Nov 2000 05:59:46 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:1982 Date: 2000-11-10T05:59:46+00:00 List-Id: On Fri, 10 Nov 2000, Ken Garlington wrote: > "Florian Weimer" wrote in message > : Robert A Duff writes: > : > Me, too. IMHO, constant should be the *default*, and you should have to > : > say "var" or something to declare a variable; then people would be less > : > likely to make this mistake. In fact, that *is* the way parameters work > : > ("in" is the default). It seems inconsistent that object declarations > : > work differently. > : > : Following these lines, you probably should mandate proper tail > : recursion as well. ;-) > > Oddly enough, I'm learning Erlang, where assignments (bindings) do produce > constants, and there are no variable declarations per se. The Erlang book > also promotes (but does not require) tail recursion. Once you get used to > it, there's a certain elegance to a functional language of this type. Yes, Erlang is nice, though as an Ada fan you should also consider learning a (mostly) functional language with strong typing and a module system. You may (or may not) be surprised to learn that strong static typing does not imply "lots of type declarations". With regards to tail recursion, or last call optimization, I don't think Erlang provides iterative constructs so it had better damned well optimize tail calls! If you'd really like to blow your mind (without drugs that is) then read Chris Okasaki's "Purely Functional Data Structures". Its an amazingly stupid world that we live in, that accepts languages like Java as great advances in the state of the art... -- Brian