Re: Python syntax in Lisp and Scheme
From: Erann Gat (my-first-name.my-last-name_at_jpl.nasa.gov)
Date: 10/09/03
- Next message: Alex Martelli: "Re: Code block literals"
- Previous message: Terry Reedy: "Re: Writing Hardware Simulators?"
- In reply to: Vis Mike: "Re: Python syntax in Lisp and Scheme"
- Next in thread: Joe Marshall: "Re: Python syntax in Lisp and Scheme"
- Reply: Joe Marshall: "Re: Python syntax in Lisp and Scheme"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 09 Oct 2003 08:44:08 -0700
In article <bm32a3$iti$1@bob.news.rcn.net>, "Vis Mike"
<visionary25@_nospam_hotmail.com> wrote:
> "Erann Gat" <my-first-name.my-last-name@jpl.nasa.gov> wrote in message
> news:my-first-name.my-last-name-0810031201410001@k-137-79-50-101.jpl.nasa.go
> v...
> > In article <xcvfzi3r2ge.fsf@famine.OCF.Berkeley.EDU>,
> > tfb@famine.OCF.Berkeley.EDU (Thomas F. Bur***) wrote:
> >
> > > > method overloading,
> > >
> > > How could you have both noncongruent argument lists, and multiple
> > > dispatch?
> >
> > C++ seems to manage it somehow.
> >
> > #include <stdio.h>
> >
> > void foo(int x, int y) { printf("1\n"); }
> > void foo(double x, int y) { printf("2\n"); }
> > void foo(char* x) { printf("3\n"); }
> >
> > main() {
> > foo(1,2);
> > foo(1.2,2);
> > foo("foo");
> > }
> >
> > compiles and runs without complaint.
> >
> > E.
>
> Ahh, but overloading only works at compile time:
That's irrelevant. When it happens doesn't change the fact that this
proves it (multiple dispatch with non-congruent arglists) is possible.
Nothing prevents you from using the same algorithm at run time.
E.
- Next message: Alex Martelli: "Re: Code block literals"
- Previous message: Terry Reedy: "Re: Writing Hardware Simulators?"
- In reply to: Vis Mike: "Re: Python syntax in Lisp and Scheme"
- Next in thread: Joe Marshall: "Re: Python syntax in Lisp and Scheme"
- Reply: Joe Marshall: "Re: Python syntax in Lisp and Scheme"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]