develooper Front page | perl.perl6.language | Postings from March 2005

Documentary annotations: $what doc<why>

Thread Next
Chip Salzenberg
March 31, 2005 13:02
Documentary annotations: $what doc<why>
Message ID:
I'd like to annotate Perl 6 parameters and other entities using
traits, since that's the best way (I know of) to have them appear
immediately in the text of the program where they are.

Supposing I had a "doc" trait, could I say:

    sub f2c (Num $temp doc<Temperature in degrees F>)
        doc<Convert degress F to degrees C>

Or would I be forced to spell it  doc('stuff')  ?
Chip Salzenberg            - a.k.a. -            <>
         Open Source is not an excuse to write fun code
            then leave the actual work to others.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About