Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!husc6!spdcc!ima!esegue!compilers-sender From: jejones@microware.com (James Jones) Newsgroups: comp.compilers Subject: Re: Enumerated data types Keywords: types, design Message-ID: <9008271418.AA28641@microware.com> Date: 27 Aug 90 14:18:52 GMT Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: jejones@microware.com (James Jones) Organization: Microware Systems Corp., Des Moines, Iowa Lines: 23 Approved: compilers@esegue.segue.boston.ma.us In-Reply-To: <1990Aug23.134826.2865@forwiss.uni-passau.de> In article <1990Aug23.134826.2865@forwiss.uni-passau.de> Luis Mandel writes: >[query about enumerated types with name clashes] If I remember rightly, Russell has enumerated types. Since constants in Russell are linguistically 0-ary functions, figuring out whether a given instance of "red" would in full Russell be bike_colours$red[] or car_colour$red[] is a particular case of the type inference problem, and the same kind of context (i.e. how is the result used?) would be used to decide whether succ[red] is bike_colours$succ[bike_colours$red[]] or ... well, you get the idea. :-) The BSD version of Russell had a kind of convoluted but usually workable heuristic for type inference. Hans Boehm showed that the problem of type inference is undecidable, but I think he's recently written a paper that appeared in SIGPLAN Notices that perhaps gives a useful subset of the problem that's easier to figure out. I hope that a new Russell or language like it appears that implements such work, because Russell is, IMHO, a very spiffy language and merits study by any would-be language designer. James Jones -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.