Class::Tangram::Containers

Class::Tangram::Containers contains information on the new container methods.
Download

Class::Tangram::Containers Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Vilain
  • Publisher web site:
  • http://search.cpan.org/~samv/

Class::Tangram::Containers Tags


Class::Tangram::Containers Description

Class::Tangram::Containers contains information on the new container methods. Class::Tangram::Containers contains information on the new container methods.The way that Class::Tangram accessors work for `collection' types changed radically since the last CPAN release.They can now all respond to the same signals, regardless of whether they are being implemented by a Set::Object, array or a hash in the data schema. Being able to hide the characteristics of the underlying data structure is generally considered a Good Thing(tm), so the features have stuck.BACKGROUNDThese features were, believe it or not, partially inspired by a short PHP job I did last year.You see, one thing that PHP does very well is associative arrays. They behave very much like Tie::ixHash ordered hashes; a single associative array can be accessed numerically OR with a key, with sensible default behaviour when you change the way you access it `mid-flight'.It is actually a fairly rare condition where you actually need an ordered hash. But pragmatically, not having to care whether you were passing a hash or an array around really started to become handy. I found myself using it more often than I thought I would, and this subtle linguistic difference in PHP paying off handsomely here and there.There I was thinking that I had been blind not to realise that PHP could have been a much more sensible language for most things - until I actually started to use it, and I started to come across the many nasty bodges at the language design level that PHP is infested with. Languages without a decent convention or method of encapsulation suck, which is just one of the many reasons why PHP sucks. But don't get me started on that.Actually, encapsulation was my primary motivation for writing Class::Tangram in the first place, to avoid the breaking of it I saw all the way through the Tangram guided tour (which obviously Jean-Louis did for the sake of brevity, not because he likes flaunts OO principles).But back to the main point; PHP took two similar types of collections - indexed arrays and associative arrays - and coaxed them into equivalence.So, I'm attempting to apply a similar principle with associations with Class::Tangram. Requirements: · Perl


Class::Tangram::Containers Related Software