LINUX.ORG.RU

John Shutt переизобрел JS?

 , ,


0

1

Recently, FEXPRs have had some more interest. John Shutt showed that FEXPR could be used to implement lambda and some other forms, reducing the number of special forms needed for a Scheme, and that in a language with LexicalScope, which earlier FEXPR-providing languages lacked, they were considerably more well-behaved, and could be reasoned about with a variation on the lambda calculus. In his KernelLanguage (of which there is currently no complete implementation) the distinct namespaces of the calling environment and the lexical environment of the FEXPR are clearly separated and explicitly addressable at runtime, which more or less eliminates the need for complicated HygienicMacro? mechanisms. Tom Lord (unsuccessfully) pushed for FEXPRs in R6RS Scheme.

http://c2.com/cgi/wiki?RuntimeMacro

По мере втыкания в этот текст, я подумал что вот это

the distinct namespaces of the calling environment and the lexical environment of the FEXPR are clearly separated and explicitly addressable at runtime,

Подозрительно напоминает вот это:

f=function(){var a=1; console.log(a, this.a)}
f.call({a: 10})
// 1 10
Собственно, kernel славен тем, что там все является first-class. Интересно, а лексическое окружение там тоже first? В JS, если смотреть с этой точки зрения, first является любое окружение кроме лексического. А может быть лексическое окружение быть first-class, чтобы при этом можно было компилять?



Последнее исправление: linux-101 (всего исправлений: 2)

Ответ на: комментарий от korvin_

Опа, лиспер пришел. Че же ты по сабжу ничего сказать на можешь? Слабоватенько, однако.

linux-101
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.