|
Re: pmc_type: msg#00579lang.perl.perl6.internals
On Wed, Oct 27, 2004 at 01:19:29PM -0600, Luke Palmer wrote: > Stéphane Payrard writes: > > That would allow to implement typechecking in imcc. > > > > .sym Scalar a > > a = new .PerlInt # ok. Perlint is derived from Scalar > > Ugh, yeah, but what does that buy you? In dynamic languages pure > derivational typechecking is very close to useless. The reason C++[1] > has pure derivational semantics is because of implementation. The > vtable functions have the same relative address, so you can use a > derived object interchangably. In a language where methods are looked > up by name, such strictures are more often over-restrictive than > helpful. So, still thinking (too?) statically, I should probably worry about what "does" a pmc instead on what it is derived from. In that case, I would not have to worry about abstract pmc classes. So abstract classes missing from the enum of core_pmcs.h, which prompted that subthread, becomes a moot point. > > Anyway, that's just my rant. If such a thing is to be in imcc, it > _must_ be optional without loss of feature. I have quibble with the > automatic typechecking of .param variables for the same reason. Declaring a symreg just as a pmc would do that anyway. > > Luke > > [1] And the reason Java has it is because C++ did. Great design work, > guys. > -- stef |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | hash multithreading and cross language issue: 00579, Sam Ruby |
|---|---|
| Next by Date: | Re: extend.c:Parrot_call: 00579, Leopold Toetsch |
| Previous by Thread: | Re: pmc_typei: 00579, Luke Palmer |
| Next by Thread: | Re: pmc_type: 00579, Paolo Molaro |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |