Loading ...
Sorry, an error occurred while loading the content.

never compile anything

Expand Messages
  • broncowitz
    I like to speculate about extremes. What if you had a language in which nothing was ever compiled, all definitions were looked up at run time. Slow, yes, but
    Message 1 of 5 , Oct 15, 2003
    • 0 Attachment
      I like to speculate about extremes. What if you had a language in
      which nothing was ever compiled, all definitions were looked up at run
      time. Slow, yes, but would there be any huge benefit?

      An interesting thing I thought of is you could combine it with a
      system whereby definitions are looked up based on context. In natural
      language we build up context as we go along and this allows us to
      asign meaning to overloaded words. In current languages meaning of a
      function comes either statically from the environment at the time of
      compile, or from the type of object(s) the function happens to be
      acting upon. But you can imagine a system where all definitions are
      looked up at run time in a dynamic environment that changes as the
      program executes.

      Not sure where I am going with this, just considering the
      possibilities and seeing where they might lead. It could be too
      complicated to program in such a system. Or it could be a step on the
      road towards programs that think more like the living.
    • Marcin 'Qrczak' Kowalczyk
      ... You mean dynamic scoping? It was used in ancient Lisps and most people believe it was a mistake. It makes passing functions as data fragile: names of local
      Message 2 of 5 , Oct 16, 2003
      • 0 Attachment
        W liƛcie z czw, 16-10-2003, godz. 08:56, broncowitz pisze:

        > But you can imagine a system where all definitions are
        > looked up at run time in a dynamic environment that changes as the
        > program executes.

        You mean dynamic scoping? It was used in ancient Lisps and most people
        believe it was a mistake. It makes passing functions as data fragile:
        names of local variables which were supposed to be implementation
        details affect code which was passed as arguments.

        Most dynamically typed languages still use kind of dynamic scoping
        for global identifiers and for methods, i.e. they make them mutable
        variables and allow to change them at any time. My lagnuage uses static
        scoping for global functions too.

        > In natural language we build up context as we go along and this allows
        > us to asign meaning to overloaded words.

        If you mean generic functions which separate definitions depending on
        types of arguments (provided from many places in the program), then it's
        known and used in CLOS, Dylan and Cecil (and my unfinished language).

        > Not sure where I am going with this, just considering the
        > possibilities and seeing where they might lead. It could be too
        > complicated to program in such a system. Or it could be a step on the
        > road towards programs that think more like the living.

        I'm not sure that makes programs more like the living would make them
        better :-)

        --
        __("< Marcin Kowalczyk
        \__/ qrczak@...
        ^^ http://qrnik.knm.org.pl/~qrczak/
      • Lutz Lennemann
        The context-sensitive aspect of this seems so intriguing to me that I am going to delurk from this list. I don t have any new programming language of my own
        Message 3 of 5 , Oct 16, 2003
        • 0 Attachment
          The "context-sensitive" aspect of this seems so intriguing to
          me that I am going to delurk from this list. I don't have any
          new programming language of my own to contribute (although
          maybe I could claim to be at the analysis stage where I am
          trying to figure out what I would want from a new programming
          language).

          I like to think about different mechanisms which a language
          could provide to implement context-sensitivity, which is
          important for many applications as Bill stated.

          Let's assume I am programming in a mainstream object-oriented
          programming language (e.g. Java/C++) and my program needs to
          accomplish a task X which requires an initiating object and two
          participating objects B and C. So I might implement a class B
          with a public method doX() and a class C with a public method
          doX(). After the initiating object has invoked B.doX, class B
          must explicitly know the type of any other objects involved in
          task X (for example C), i.e. the overall logic how task X is
          accomplished is tangled with the logic which implements the
          individual responsibilities of B and C. If I have another task
          Y with two participating objects B and D, I need a separate method
          doY() in class B, even if the individual responsibility of B is
          the same in task X and Y. It would be useful if my programming
          language would allow B to simply keep doing what it does without
          having to be aware of the overall context, and allow me to
          define explicit abstractions for tasks A and B which determine
          the meaning of B's individual contribution depending on the
          context.

          So you could say that I am looking for a language which allows
          me to dispatch method invocations across multiple objects based
          on the type of the method invocation itself (instead of dispatching
          based on the type of the invoked object or based on the type of
          the method arguments). Within a single object, I would still want
          to have private attributes, private methods and local variables
          just like I have now, i.e. I just want to have a better way of
          dispatching public and protected methods. You can program in
          this style using an existing OO language (I am trying this now!),
          but this feels just like trying to do OO-style programming in
          a procedural language by passing a "this" reference to every
          function. You could also see this as a generalization of aspect-
          oriented programming. When you write an aspect, the methods of
          the aspect often take an argument which represents the method
          invocation that is currently in progress, however usually you
          can have only a single type of method invocation which is defined
          by the tool, you can't define your own types of method invocations
          and dispatch on them.

          Any thoughts on this? Is there any prior art that tries to solve
          similar problems? Or is this where I start building my own
          programming language ;) ?

          --Lutz

          --- In langsmiths@yahoogroups.com, "broncowitz" <broncowitz@y...>
          wrote:
          > I like to speculate about extremes. What if you had a language in
          > which nothing was ever compiled, all definitions were looked up at
          run
          > time. Slow, yes, but would there be any huge benefit?
          >
          > An interesting thing I thought of is you could combine it with a
          > system whereby definitions are looked up based on context. In
          natural
          > language we build up context as we go along and this allows us to
          > asign meaning to overloaded words. In current languages meaning of
          a
          > function comes either statically from the environment at the time of
          > compile, or from the type of object(s) the function happens to be
          > acting upon. But you can imagine a system where all definitions are
          > looked up at run time in a dynamic environment that changes as the
          > program executes.
          >
          > Not sure where I am going with this, just considering the
          > possibilities and seeing where they might lead. It could be too
          > complicated to program in such a system. Or it could be a step on
          the
          > road towards programs that think more like the living.
        • James McCartney
          ... Rebol sort of works this way. The program is a list of words. The leftmost word is parsed and executed and it gets to decide what to do with the remainder
          Message 4 of 5 , Oct 16, 2003
          • 0 Attachment
            On Oct 15, 2003, at 11:56 PM, broncowitz wrote:

            > I like to speculate about extremes. What if you had a language in
            > which nothing was ever compiled, all definitions were looked up at run
            > time. Slow, yes, but would there be any huge benefit?
            >
            > An interesting thing I thought of is you could combine it with a
            > system whereby definitions are looked up based on context. In natural
            > language we build up context as we go along and this allows us to
            > asign meaning to overloaded words. In current languages meaning of a
            > function comes either statically from the environment at the time of
            > compile, or from the type of object(s) the function happens to be
            > acting upon. But you can imagine a system where all definitions are
            > looked up at run time in a dynamic environment that changes as the
            > program executes.

            Rebol sort of works this way. The program is a list of words. The
            leftmost word is parsed and executed and it gets to decide what to do
            with the remainder of the program. Basically each word can be an
            interpreter for the rest of the program.

            http://www.rebol.com/docs/core23/rebolcore.html

            --
            --- james mccartney james@... <http://www.audiosynth.com>
            SuperCollider - a real time audio synthesis programming language
          • Logan, Patrick D
            ... Two possibilities somewhat related come to mind... 1. At the language level, you might look at HydroJ from U.Washington.
            Message 5 of 5 , Oct 17, 2003
            • 0 Attachment
              > So you could say that I am looking for a language which allows me to
              > dispatch method invocations across multiple objects based on the
              > type of the method invocation itself (instead of dispatching based
              > on the type of the invoked object or based on the type of the method
              > arguments)... Within a single object, I would still want to have
              > private attributes, private methods and local variables just like I
              > have now, i.e. I just want to have a better way of dispatching...

              Two possibilities somewhat related come to mind...

              1. At the language level, you might look at HydroJ from U.Washington.

              http://www.cs.washington.edu/research/projects/cecil/www/pubs/hydroj.htm
              l

              2. At the language-independent level, you might look at various
              "blackboard" or "tuple space" mechanisms for passing semi-structured
              messages among processes.

              Both of these are ways to take one (or two) steps back from the
              traditional OO message dispatch mechanisms into a more loosely coupled
              context.

              -Patrick
            Your message has been successfully submitted and would be delivered to recipients shortly.