Re: [stack] Parameters: ordered versus named
Don Groves <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Sep 9, 2007, at 19:06 , Christopher Diggins wrote: > On 9/9/07, Don Groves <[email protected]> wrote: >>>> Thanks for the info. In what ways does Cat's inferred type system >>>> differ? >>>> -- >>> >>> From what? >>> >>> -Christopher >> >> From an "uninferred" one. I'm thinking a large part of my problem is >> lack of vocabulary. I tried to find a definition of an "inferred" >> type >> system via Google but was unsuccessful. > > Some examples of languages with type inference are ML, OCaML, Haskell, > F#, Scala, Boo, Nice, Cyclone, and of course Cat. > > Type inference (also known as type reconstruction) is not a property > of the type system but rather a property of a language. Two languages > can share a type system, whereas one requires type annotations (a.k.a > type signatures) wheras another doesn't. Some type systems lend > themselves to type inference (e.g. ML style type systems). Type > inference is often achieved using what is known as the Hindley-Milner > algorithm. > > Your most successful search keywords are going to be "type inference". > > Hope this helps, > Christopher Yes, it helps a lot! Having fried my brain for the last two hours reading up on type inference, one thing stands out for the development of Catenate: if I infer the type of a variable from its initialization literal, and restrict that variable from ever holding a different type, then I can disable type checking for compiled programs. I'm not thinking much about execution speed yet, but doing this should speed up things considerably down the road. -- Don Programmer (n): an organism that turns coffee and cookies into software.