develooper Front page | perl.perl5.porters | Postings from January 2014

Re: How on earth did we manage to break pack() so badly?

Thread Previous | Thread Next
From:
Shlomi Fish
Date:
January 15, 2014 08:34
Subject:
Re: How on earth did we manage to break pack() so badly?
Message ID:
20140115103422.6adccd7b@telaviv1.shlomifish.org
Hi Johan,

On Tue, 14 Jan 2014 21:12:57 +0100
Johan Vromans <jvromans@squirrel.nl> wrote:

> "Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> writes:
> 
> > Personally I'd be in favour of prototyping a brand new pack-alike
> > thing on CPAN, to fix these and some other issues.
> 
> Personally, I'd like to carry this even a step further.
> 
> The Perl programming language has a couple of features that are
> basically programming languages within the programming language. These
> features are pattern matching, pack/unpack and formats. While
> historically this may have been a good approach, these features have
> seen a lot of evolution in the last 25 years and one may wonder whether
> keeping them as a language within a language is still a good thing.
> 
> For most common purposes it's okay to have these features as they are
> right now, but when it comes to substantial extensions and improvements
> it may be worth to consider a new and totally different approach.
> 
> For pack/unpack I'd love to see a CPAN module that uses a well defined,
> user friendly and less cryptic method to describe the data packing and
> unpacking.

There are some CPAN modules like that, including
https://metacpan.org/release/Data-ParseBinary , which was inspired by
PyConstruct - http://construct.readthedocs.org/en/latest/ .

For formats, there is Perl6-Form (see
http://perl-begin.org/tutorials/bad-elements/#perlform ).

I think we should not break backward-compatibility, but it may be a good idea
to keep some features frozen and recommend looking at better "user-land"
alternatives on CPAN.

> 
> I know that it is a deadly sin to make a suggestion like this without
> offering a completely worked out design -- so be it. Nevertheless I do
> hope that it may free some minds from the dead end track of even more
> super-cryptic pack/unpack templates.
> 

Yes, I agree.

> -- Johan


Regards,

	Shlomi Fish


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/Can-I-SCO-Now/ - "Can I SCO Now?"

Buffy will always find a wooden stake to slay vampires, even if it means
she will have travelled 100 years back in time, to plant a tree nearby.
    — http://www.shlomifish.org/humour/bits/facts/Buffy/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Thread Previous | 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