zlacker

[parent] [thread] 2 comments
1. thesz+(OP)[view] [source] 2024-10-20 18:14:17

  > Develop your own ad hoc run-time type and mode checking system.
"Any sufficiently complicated List or Prolog program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Haskell type inference and checking system."

Modelled after Greenspun's Tenth Rule [1].

[1] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

replies(1): >>illogi+H9a
2. illogi+H9a[view] [source] 2024-10-24 15:17:02
>>thesz+(OP)
I suppose you could hack a bug-ridden implementation of Prolog unification in Prolog but why?

Hindley-Milner type inference is unification over types and unification is built-in to Prolog. Functional programmers ignore this because their textbooks never refer to the original description of unification by Robinson. Wait who? Unification was probably invented by Damas, Hindley or Milner right? Or maybe Haskell Curry? Hey maybe it was John McCarthy?

replies(1): >>thesz+8Nk
◧◩
3. thesz+8Nk[view] [source] [discussion] 2024-10-28 22:35:34
>>illogi+H9a
Prolog was introduced into general public in 1972, 4 years after Hindley's algorithm that used unification and substitution.

In any case, what was suggested is, frankly, a development of the (tailored up) type system.

My experiece suggests that this development will not be without caveats, especially related to performance.

[go to top]