lizard_liza (
lizard_liza) wrote2010-08-19 07:45 pm
Entry tags:
баян, наверное
но все равно занятно
есть еще прекрасный язык
Algol pass by name (illustrated using C syntax):
int a[3] = { 1, 2, 3 };
int i = 1;
void f(int j)
{
int k;
k = j; // k = 2
i = 0;
k = j; // k = 1 (!?!)
}
int main()
{
f(a[i]);
}
или вот еще
Let's have a vote for all languages (such as PL/I) that tried to do away with reserved words.
Where else could you legally write such amusing expressions as:
IF IF THEN THEN = ELSE ELSE ELSE = THEN
(IF, THEN, ELSE are variable names)
or
IF IF THEN THEN ELSE ELSE
(IF is a variable, THEN and ELSE are subroutines)
больше прекрасного тут
есть еще прекрасный язык
Algol pass by name (illustrated using C syntax):
int a[3] = { 1, 2, 3 };
int i = 1;
void f(int j)
{
int k;
k = j; // k = 2
i = 0;
k = j; // k = 1 (!?!)
}
int main()
{
f(a[i]);
}
или вот еще
Let's have a vote for all languages (such as PL/I) that tried to do away with reserved words.
Where else could you legally write such amusing expressions as:
IF IF THEN THEN = ELSE ELSE ELSE = THEN
(IF, THEN, ELSE are variable names)
or
IF IF THEN THEN ELSE ELSE
(IF is a variable, THEN and ELSE are subroutines)
больше прекрасного тут