[% setvar title enhanced groups in pack/unpack %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/

TITLE

enhanced groups in pack/unpack

VERSION

  Maintainer: Ilya Zakharevich <ilya@math.ohio-state.edu>
  Date: 16 September 2000
  Mailing List: perl6-language-data@perl.org
  Number: 248
  Version: 1
  Status: Developing

ABSTRACT

This RFC makes pack/unpack builtins able to handle non-flat lists. Four additional action-types in TEMPLATES cover most paradigms in binary storage of data: data groups, required group headers, position-specific "named" data, arbitrary-order fields.

DESCRIPTION

Currently pack() encodes data supplied in a flat list, and unpack() extracts data into a flat list. This proposal introduces marked groups in TEMPLATES which allow to handle more complicated structured data.

A group is introduced by a type 'g' followed by matched parentheses.

MIGRATION ISSUES

None.

IMPLEMENTATION

Straightforward.

REFERENCES

RFC 142: Enhanced Pack/Unpack

RFC 246: pack/unpack uncontrovercial enhancements

RFC 247: pack/unpack C-like enhancements