Mailing List Archive

Support open source code!


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

Re: Python discussion, anybody?



>>>>> "Todd" == Todd Rudick <Todd.Rudick@example.com> writes:

    Todd>   Uhhh.. No. I specifically dealt with the undecidability in
    Todd> a footnote. I would not be checking to see what methods can
    Todd> possibly be called in a mathematically rigerous fashion,
    Todd> including arguments about what the program does when run,
    Todd> which, yes, is undecidable. I'd be assuming at every program
    Todd> branch that either path _can_ happen.

int func (int n)
{
    int *p = (int *) n;
    p = (int *) *p;
    return *p;
}

Lotta paths there.  In practice, I think you are going to have the
same problem that optimizing C compilers have with aliasing through
pointers.

    >> Um, CORBA?  Oops.  You now have to worry about the whole World
    >> Wide Web.  I hope your net connection is up!

    Todd>   No. Think about it again. Your interface to Corba must at
    Todd> some point reference the methods in your object, or they
    Todd> could not be used. So indeed, any object making itself
    Todd> available to a Corba engine would need to define its entire
    Todd> interface.

As Peter Gabriel said, "I'm a LISP engine, baby, and I want your
sexp!"

It's a well-defined interface, no?

    Todd> Furthermore, as soon as I add a call "convertToFoobar()" on
    Todd> something I pull out of this HashTable, the tool would
    Todd> insist that everything I COULD put on that same object
    Todd> implement this method. Get it?

Urk ... 

    >> What you're talking about is far more powerful than strong
    >> typing could be.

    Todd>   Unless I'm mistaken it's identical to strong typing,
    Todd> except the compiler would generate all your interfaces for
    Todd> you, excluding the parts you designed but happen not to
    Todd> reference in your particular program.

Uh, no.  Think about what you wrote immediately above the call to
"urk" above.  In the theoretical extreme, you only have one type: the
union of all types ever used in your program (if the compiler proceeds
to generate the necessary interfaces) or the intersection (if the
compiler proceeds to disallow your code when you haven't provided the
necessary interfaces).  In a program like a LISP interpreter, the
extreme is achieved:  the interface is the string, which is parsed to
a sexp.

Now, since the vast majority of the translator-generated interface is
bogus, the sensible thing to do is have translator-generated default
method implementations.  aka "run-time errors".  oops.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links