Lambda the Ultimate

inactiveTopic Type inference in Icon
started 12/26/2002; 3:23:58 PM - last post 12/27/2002; 7:07:58 AM
Ehud Lamm - Type inference in Icon  blueArrow
12/26/2002; 3:23:58 PM (reads: 1588, responses: 2)
Type inference in Icon
More holiday reading.

The original, interpretiveimplementation of Icon performs rigorous run-time type checking and incurs significant overhead as a result. A new optimizing compiler for Icon, on the other hand, has a type inferencing system that is effective in determining type usage and in eliminating much of the run-time checking that otherwise would be required.

In a sense this is similar to soft typing.

One interesting particularity is that Icon generators, that produce a sequence of values, need not always yield values of the same type.

The type inferencing system was used to collect data about many Icon programs. The data showed that, on the average, the operands of about 80% of the operators in these programs always had the same type.


Posted to implementation by Ehud Lamm on 12/26/02; 3:26:11 PM

Michael Vanier - Re: Type inference in Icon  blueArrow
12/27/2002; 2:16:49 AM (reads: 447, responses: 1)
<slightly off-topic>

Icon seems to be a classic case of a language that has been extremely influential (python and ruby have both borrowed features from it) but is hardly used at all by anyone. I've seen very little material on Icon that didn't come out of the Arizona group. It's a shame, because it seems like a very nice language in many ways, and it was a "scripting language" long before the current scripting language boom occurred. I think the reason for its lack of popularity is mostly that the failure/backtracking paradigm is somewhat hard for most people to wrap their minds around. When it works, though, it can really result in some astonishingly concise and elegant code. This language is near the top of my "gotta learn one day" language pile (along with haskell, j and prolog ;-)).

</slightly off-topic>

Ehud Lamm - Re: Type inference in Icon  blueArrow
12/27/2002; 7:07:58 AM (reads: 459, responses: 0)
Icon is near the top of my "gotta learn one day" language pile (along with haskell, j and prolog

Well, these are all important languages to know.

J is quite an unusal langugae, and it can take quite a while to learn it properly. But you should at least read one of the excellent tutorials. Obviously the more important language from this family is APL.

No one should walk around not knowing Prolog and Haskell, of course