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

Documentary annotations: $what doc<why>

Thread Next
From:
Chip Salzenberg
Date:
March 31, 2005 13:02
Subject:
Documentary annotations: $what doc<why>
Message ID:
20050331184144.GA5767@perlsupport.com
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. -            <chip@pobox.com>
         Open Source is not an excuse to write fun code
            then leave the actual work to others.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About