Mailing List Archive

Support open source code!


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

Re: Python discussion, anybody?



On Fri, 27 Oct 2000, Stephen J. Turnbull wrote:

> But who would run it?  The typical result would be that the code would
> be delivered to the customer today, while checking over the lint
> output (6 times as long as the source code ;-) won't be done until
> next week!

  Ok, so where do you put this? It's way too expensive to do at run-time,
it's important (I think, at least), and it's always an error (unless
downcasting is acceptable, and maybe some extra syntax (explicit casting
which checks at runtime, like Java) can accomodate this).

>     Todd>   Does that make sense? Do any of the smalltalk like
>     Todd> "see-what-happens" weakly typed OO languages have this sort
>     Todd> of feature/utility?
> Lisp byte-compilers do this.

  Really? Are you sure--it'd be an operation which would depend on having
all the modules of a program at once (and is somewhat particular to that
program)--any little change to one class could have all kinds of
repercussions. E.g., if I pull an object off a list and call some method
on it, this would require tracing back all the possible objects that could
have ended up on that list (in this particular program) and making sure
they support this method. Sort of implicit templating. Dunno what the
error would be, maybe:

Fatal Error:
  - You call 'fooobar()' on an object on line #40 of file
    - which was assigned to on line #37 of file
      - which used the return value of static method getGUI... #...
        - which was assigned to on line #580 ...
          - which was passed as arg #3 to rjij on line #ijfreji
            - ...
                ...
                  ...
                    - which is created as a Foobar on line #4938
                      - which does not define the method 'fooobar()'

  Propagating every object creation to every method call that could happen
for a large program would be a pretty huge calculation, but it's exactly
the advantage you get with strong typing (and indeed, once this is done
you could then proceed with a whole slew of optimizations not otherwise
possible, I believe).

  Lisp does this?

-- Todd


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links