[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scoping (Was: Little PDF hack)

From: Valeriy E. Ushakov
Subject: Re: Scoping (Was: Little PDF hack)
Date: Sat, 4 Apr 1998 00:46:07 +0400

On Fri, Apr 03, 1998 at 04:14:35PM +0200, Jerzy Karczmarczuk wrote:

> Uwe (I wonder why Valeriy signs his letters in such a way, 

Cause the final "iy" is usually mispronounced by non-slavic speakers
and the name ends up being pronounced as Valerie, which is a female
name.  U.W.E. are my initials (ther's no W/V distinction in Russian).
So it was my login name and only after some years it got capitalized
and stuck to be a nick.

> adding yet a German citation to his signature,

I like it.  Note, that both "to grunde comen" and "to grunde gan" had
a meaning "to die" in Middle English (and other languages of the
German family).  So the word-play is intended.  The quote is, as far
as I know, from Hegel, but I can't name the chapter and the verse as I
picked it up over a shoulder from a book on philosophy read by someone
in cafeteria.

The fact that Uwe is a German name and the quote is in German is
purely coincidental, really.

> but, well, it is not my problem)

And all this, certainly, has nothing to do with Lout :-).

> comments \TeX:
[uwe: quote skipped]
> This information is not really complete.

I'm perfectly aware of this.  I was NOT discussing TeX ways.

> In a statically scoped language it can be also done, and even in a
> more structured way, but then it would require the dynamical
> creation of closures, the *real* functional programming. I have the
> impression that it is not so easy to code in Lout.

I'm afraid I don't completely understand what do you mean by dynamical
creation of closures.  First-class functions?

Lout doesn't have an explicit lambda, nor does it permit currying.
However you can pass functions around via named parameters that have
their own named parameters.  Though, admittedly, the syntax for this
is kludgy:

  # symbol with functional argument
  def @Foo
    named @Fun # this argument is a function
      named @Param
       # default implementation
       @DoSomething @Param
    # ...
    @Fun { actual parameter }
    # ...
  @End @Foo

  # Some function you want to pass as an argument
  def @TheFoo named @Arg { ... }

  # At invocation you have to write the *body* that implements the
  # functional argument.  Note that the definition of @Foo is far-far
  # away, but you have to mention the @Param parameter to @Fun.
  @Foo @Fun { @TheFoo @Param }

SY, Valeriy
address@hidden                     |     Dwelling at the cemeteries
http://www.ptc.spbu.ru/~uwe/        |     they laugh and perform miracles

reply via email to

[Prev in Thread] Current Thread [Next in Thread]