[racket] Metadata idea

From: Jukka Tuominen (jukka.tuominen at finndesign.fi)
Date: Thu Mar 31 07:02:41 EDT 2011


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

(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


(define (function-x args)
  (define ...)
  (meta ( ()()() ) )
  (begin ...))

(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

Posted on the users mailing list.