Hacker News new | past | comments | ask | show | jobs | submit login

> OK, let's put it differently. In these old Lisps they indeed had FIXNUM+ and REAL+ or whatever and explicit coercing, the Fortran way, reflecting how a machine works,

Wrong. Lisp had a generic + function LOOONG before Scheme. It was called PLUS.

The Lisp 1.6 manual from 1968:

'Unless otherwise noted, the following arithmetic functions are defined for both integer, real and mixed combinations of arguments... The result is real if any argument is real, and integer if all arguments are integer...'

It then describes the functions MINUS, PLUS, DIF, TIMES, QUOTIENT, DIVIDE, ...

Examples in the manual:

(PLUS 1 2 3.1) = 6.1

(PLUS 6 3 -2) = 7

(TIMES -2 2.0) = 4.0

> Scheme pioneered the approach with only one '+ generic procedure exported with all the "rising" done implicitly - influenced by Algol.

That's what Lisp did in the 60s. The function was called PLUS.

It was fully generic.

It is nothing Scheme has contributed.




> Unless otherwise noted, the following arithmetic functions are defined for both integer, real and mixed combinations of arguments

This is good point. Thanks. It seems that the original view of John John McCarthy - before the decade of different implementations, was "right",

> It is nothing Scheme has contributed.

Scheme, it seems, re-emphasized it, much later, as the answer to the mess made by different implementations.

I could give you an example form a complete different field, in order to show how common such pattern is.

The very first Aryan Vedas emphasize the notion of taking inspirations from the nature and remaining in unity with it. They use deities as symbols for the major natural powers and appreciate them.

Then these ideas has been taken by "other people" and mechanistic, ritual-based religions, based on worshiping and praising of anthropomorphic idols emerge. This, in turn, resulted in emergence of Upanishads as thinking people got sick with all that nonsense, and from the Upanishads the Advaita Vedanta and Buddhism schools has been developed (and got ruined by "commentators").

This is a social pattern. I can't tell how meany times in history these cycles of inflation and reduction, mass hysteria and returning back to the very few "great insights" happened.

I am not telling you that this my analogy for the evolution of Lisps is precise - only the MIT guys behind Scheme could tell whether I am wrong or not - but I have this notion, based on what I read in books and watched in lectures, so I, if you have no objections, would still hold my opinions.


I can't remember anything in that direction from Scheme. In the original Scheme papers there was an exploration of the Actor ideas of message passing.

But generic operations were explored in detail in actor implementations in Lisp and in various forms of object systems in Lisp. Scheme itself as a language only provided hard-coded generic functions. The 1985 Scheme report included nothing generic beyond the few hard-defined generic functions. At a time when software in Lisp explored already user defined multiple inheritance, message sending, pattern-based invocation, ... Sussman himself knew Maclisp very well. True, SICP showed how to implement and use generic operations, but then that was already a decade old...


OK. I am wrong with the word "pioneered". Emphasized the use of generic procedures instead of "typed procedures" would be more correct.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: