Path: news.cs.au.dk!news.net.uni-c.dk!howland.erols.net!newshub.northeast.verio.net!btnet-peer!btnet!news-feed1.eu.concert.net!skynet.be!poster!not-for-mail From: Jean-Louis Leroy Newsgroups: comp.lang.beta Subject: Re: Is Beta a statically typed language? Date: Tue, 12 Jan 1999 23:44:17 +0100 Organization: Starfleet Lines: 52 Message-ID: References: <77b7fc$l2o$1@xinwen.cs.au.dk> Reply-To: jll@skynet.be NNTP-Posting-Host: dialup24.brussels2.skynet.be Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news1.skynet.be 916180473 24825 195.238.23.24 (12 Jan 1999 22:34:33 GMT) X-Complaints-To: abuse@skynet.be NNTP-Posting-Date: 12 Jan 1999 22:34:33 GMT X-Newsreader: Virtual Access by Ashmount Research Ltd, http://www.ashmount.com Xref: news.cs.au.dk comp.lang.beta:11787 In article <77b7fc$l2o$1@xinwen.cs.au.dk>, Ole Lehrmann Madsen wrote: > BETA is not completely statically typed. I'm not obsessed with perfect type safety anymore. After having had a very successful relationship with C++ as a one-man team, I've reconsidered after spending the last two years with colleagues who were competent and talented programmers without being - or willing to become - language lawyers with a law book that runs for 800 pages. In the case of C++ paranoid static type checking lead to the introduction of flexibility features (i.e. templates) which have introduced way too much complexity in the language. IMHO. I've taken a long look at Perl. I think it's one of the most productive alternatives for many problems, however, I want the compiler to help me in those situations where I add or change the type of a parameter. IOW I'm looking for *usefully* typed languages ;-) Back to the point; my Animal & Fruits example was of course poor design, because an animal that only eats bananas is *not* an animal that eat all fruits. Unfortunately the current Beta collections suffer from the same problem: (# Person: (# #); people: @Set (# element:: Person #); backdoor: ^Set do &Person[]->people.insert; people[]->backdoor[]; (* no warning *) &integerObject[]->backdoor.insert (* trouble *) #) The problem here is that there exists an automatic, silent conversion from a Set of Persons to a Set of Objects. Couldn't this be avoided by introducing some form of 'partially private' inheritance? For example, by specifying that a subpattern that refines a virtual type that is used in an enter-list inherits the implementation of the superpattern without being a subtype of it? Aw, one step toward Beta++ :( > We have discussed these issues in several papers I have tried to find them in electronical form, without success so far. How can I obtain them? Jean-Louis Leroy http://ourworld.compuserve.com/homepages/jl_leroy/