# Labrador-0.0.1 pre alpha released

**URL:** <https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769>\
**Category:** Ruby\
**Created:** [June 13, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769 "2007-06-13T23:11:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flatekmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e8c25b/32.png) [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Post date:** [June 13, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769/1 "2007-06-13T23:11:38Z")

</div>

Hi list

the very diligent folks from RubyForge have approved my request early  
so I can thankfully pronounce the first release of Labrador.

Strange name for a strange package 🙂 Here you go:

Labrador is a little bit like me, badly organized.  
It is a quite unrelated collection of Ruby Code.  
Maybe some day it will evolve into independant packages, maybe it will  
not.

Right, what can Labrador do for you?

## Propeties

First there is labrador/properties allowing to define properties  
without instance variables  
by means of closures. Check out the rdoc to learn more about it but a  
very quick overview.

The technique I use comes from Tom Christiansans famous TOT, Tom’s  
Object Tutorial.

- Safe, nobody will change your const property there is just no way.
- Instance variable safe subclassing, as long as you carefully check  
your properties  
in your inheritance chain and define your properties accordingly you  
can use  
instance variables internally without any danger of interference.  
Instance variable free classes are thus ideal for frameworks.
- The approach allows for interesting enhancements like e.g.  
synchronisation mechanisms  
by properties, changing property traits dynamically and many more.

- Slow, benchmarks show consistently that property access is about 4  
times slower than  
Instance variable accessors.
- Complicated, although the complexity of the implementation is  
perfectly hidden enhancements  
can become difficult and might impose some more performance penalty.  
A very extensive test  
suit - provided as far as I know - is necessary.

## Labrador Enums

Very condense enumerator notation for lazy people. Special Style I  
want to share with  
those who are interested.

labrador/enum/map is released  
labrador/enum/reject is under development.

assert\_equal %w{ b c d }, %w{ a b c }.map(:succ)  
assert\_equal %w{ b c d }, %w{ a b c }.map.succ

assert\_equal [\*2…4], Set.new( [\*0…2] ).map(:+, 2).sort

Look into test/test-map.rb for more examples.

Enjoy  
Robert

---

<div class="post-metadata">

**Author:** ![flatekmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e8c25b/32.png) [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Post date:** [June 13, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769/2 "2007-06-13T23:14:39Z")

</div>

[http://rubyforge.org/projects/labrador/](http://rubyforge.org/projects/labrador/)  
this might be useful 😉

Robert
