Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Re: Re: Re: Apocalypse 12

by TimToady (Parson)
on Apr 20, 2004 at 02:16 UTC ( #346519=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Apocalypse 12
in thread Apocalypse 12

3. I'd like to understand the proposed aliasing mechanism better than I do. I understand the need (particularly when cooperating across languages), but I'd like to understand how it will be done.
Me too. :-) I suspect it will involve allomorphic references, but hopefully only at a low-level that can be hidden from the languages in question.

Certainly there are lots of issues to deal with here. Even what you name your exceptions changes across languages...

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Apocalypse 12
by tilly (Archbishop) on Apr 21, 2004 at 00:10 UTC
    I'm not entirely sure that I understand what you mean by "allomorphic references". However the first design that comes to my mind is that Perl 6 should define what it looks like to refer directly to something in another language, and then there should be tools built to offer a translation service, translating the one language into another. If no translation layer exists, then things like errors are pretty much opaque to Perl. If a translation layer exists, then it handles things however you would like.

    A thought: the translation layers should not just map classes, but should be able to add/detect useful metadata. For instance in translating Perl errors into Ruby or Python, it may be good to allow a Perl type to translate into a Ruby Class, and a Ruby Class to translate into a Perl Class with some extra metadata tagged on it (so that it falls into a type that would be translated back). This piece of complexity allows you to do as reasonable a job as is realistically possible in translating between 2 class hierarchies that divided things up in fundamentally incompatible ways.

    Yes, this kind of approach would make those interfaces substantially more complex. But I think that the complexity is necessary.

    A tangential thought that this discussion of translation brings to mind. I think that it is important for the Perl world to plan on some "best practices" for handling internationalization. (Documentation, error messages, etc.) The current CPAN works great..if you're willing to say that all programmers must speak English fluently. But I'm convinced that many people with scripting problems do not speak English as a first language, and I'd like to think that Perl will attempt to address their problems.

      Definition of alomorph:
      A variant phonological representation of a morpheme; "the final sounds of `bets' and `beds' and `horses' and `oxen' are allomorphs of the English plural morpheme"

      For those without ancient languages... greek and latin roots. Basically morph is shape, allo is "different" or "another".

      Another definition for allomorph seems a bit closer to Larry's reply: "An allomorph is one of two or more complementary morphs which manifest a morpheme in its different phonological or morphological environments."

      So, I guess in the computer context, an allomorph is an object that manifests differently depending on the context.

        I was using "allomorph" neither in the linguistic sense you quoted, nor in the crystalographic sense you omitted, but in the more general sense of "an abstract object that can manifest different shapes in different contexts." When you read a dictionary entry with two related but specific meanings, you really ought to expect that those meanings are allomorphs of a single underlying meaning, especially when that general meaning is easily derived from the meanings of the Greek morphemes in question.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://346519]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2018-01-17 13:29 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (200 votes). Check out past polls.