[racket] Metadata idea
Second thought - to avoid any special system definitions, you could achieve
the same results as follows...
(define meta '((tooltip "This is a tooltip"); plain text
(manual (fetch-manual-chapter 'object-x)); Rich-text format
(self-test 'object-x); associated test cases to assure
... ; bugfree and compatible updates
))
Then the helpers could do all the work needed.
br, jukka
> -----Original Message-----
> From: users-bounces at racket-lang.org
> [mailto:users-bounces at racket-lang.org]On Behalf Of Jukka Tuominen
> Sent: 31 March 2011 14:03
> To: users at racket-lang.org
> Subject: [racket] Metadata idea
>
>
>
> Hi,
>
> I've been thinking of adding the following metadata 'feature' to
> Liitin, but
> I wonder if this could be of more generic use. What do you think about the
> idea?
>
> (meta ((tooltip "This is a tooltip"); plain text
> (manual (fetch-manual-chapter 'object-x)); Rich-text format
> (self-test 'object-x); associated test cases to assure
> ... ; bugfree and compatible updates
> ))
>
> e.g.
>
> (define (function-x args)
> (define ...)
> (meta ( ()()() ) )
> (begin ...))
>
> Helpers:
> (meta-exist? object-source meta-type) >> true/false
> (get-meta object-source meta-type) >> meta-content
> (put-meta! object-source meta-type meta-content) >> modified object source
>
> - Object-source can be either provided as source code or as a reference
> where to fetch it (incl. comments, formatting etc.)
>
>
> Features/ reasoning:
> - Object internal metadata information.
> - Self-contained, not requiring a special infrastructure.
> - Return actual metadata content rather than human navigated link.
> - Can refer to external objects to keep the main object compact,
> and allow separate development for each metadata.
> - Could return localized versions (up to metadata provider).
> - Applications can utilize the metadata on-the-spot, without opening
> external viewers or requiring human interaction (e.g. displaying tooltip
> when hovering on top of a function, or offering extra functionality on
> context menu).
> - 'define' level declaration.
> - Different object versions/variants are free to use common metadata.
>
> br, jukka
>
>
> | J U K K A T U O M I N E N
> | m a n a g i n g d i r e c t o r M. A.
> |
> | Finndesign Kauppiaankatu 13, FI-00160 Helsinki, Finland
> | mobile +358 50 5666290
> | jukka.tuominen at finndesign.fi www.finndesign.fi
>
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users