All Projects → tesonep → pharo-talents

tesonep / pharo-talents

Licence: MIT License
No description or website provided.

Programming Languages

smalltalk
420 projects
shell
77523 projects

Labels

Projects that are alternatives of or similar to pharo-talents

metacello
Metacello is a package management system for Smalltalk
Stars: ✭ 79 (+295%)
Mutual labels:  pharo
NeoCSV
NeoCSV is an elegant and efficient standalone Smalltalk framework to read and write CSV converting to or from Smalltalk objects.
Stars: ✭ 20 (+0%)
Mutual labels:  pharo
themes
A repository for alternative Pharo themes
Stars: ✭ 18 (-10%)
Mutual labels:  pharo
Moose
MOOSE - Platform for software and data analysis.
Stars: ✭ 110 (+450%)
Mutual labels:  pharo
NEAT
NEAT implementation in Pharo
Stars: ✭ 16 (-20%)
Mutual labels:  pharo
Buoy
A complement to Pharo
Stars: ✭ 18 (-10%)
Mutual labels:  pharo
heysql
Sql-based orm based on smalltalk reflection ideas
Stars: ✭ 19 (-5%)
Mutual labels:  pharo
mars-gtk
The Gtk3 bindings for Pharo and Spec
Stars: ✭ 14 (-30%)
Mutual labels:  pharo
Microdown
Microdown is a cleaned and simpler markdown but with more powerful features such as extensions.
Stars: ✭ 26 (+30%)
Mutual labels:  pharo
RenoirSt
A DSL enabling programmatic cascading style sheet generation for Pharo Smalltalk
Stars: ✭ 19 (-5%)
Mutual labels:  pharo
glorp
Generic Lightweight Object Relational Persistence
Stars: ✭ 15 (-25%)
Mutual labels:  pharo
Fog
Pharo Ethereum Driver
Stars: ✭ 19 (-5%)
Mutual labels:  pharo
fari.sh
fari.sh — fresh, ready-to-hack Pharo images
Stars: ✭ 12 (-40%)
Mutual labels:  pharo
NeoConsole
NeoConsole offers a command line (REPL) interface to a Pharo image, as well as other tools.
Stars: ✭ 22 (+10%)
Mutual labels:  pharo
NeoJSON
NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.
Stars: ✭ 29 (+45%)
Mutual labels:  pharo
hunter
Hunter: a JavaScript reengineering platform.
Stars: ✭ 31 (+55%)
Mutual labels:  pharo
Grease
The Grease Portability Library
Stars: ✭ 12 (-40%)
Mutual labels:  pharo
opensmalltalk-vm
This is the VM used by Pharo
Stars: ✭ 59 (+195%)
Mutual labels:  pharo
QualityAssistant
A live feedback code quality tool for Pharo
Stars: ✭ 17 (-15%)
Mutual labels:  pharo
libtensorflow-pharo-bindings
TensorFlow library bindings for Pharo
Stars: ✭ 30 (+50%)
Mutual labels:  pharo

Talents for Pharo

Talents are Traits that are installed on single objects.

Pharo-Talents is a library that provides a clean implementation of Talents for Pharo Smalltalk. It is based in a new implementation of the ClassBuilder and Traits that allows the creation of really independent classes in the system.

Talents enables adding and removing behavior and state to objects, without modifying the classes.

This is an implementation of the idea presented in the work of Ressia et al. "Talents: an environment for dynamically composing units of reuse".

Install Talents

Talents is developed using the new Traits implementation of Pharo8. Install with:

Metacello new
  baseline: 'Talents';
  repository: 'github://tesonep/pharo-talents/src';
  load.

Usage

What is a Talent?

A talent is only a trait definition. This library uses regular traits as talents. This is in order of reuse the existing infrastructure of Pharo.

When you add a talent to an object all the behavior and slots of the trait used as a talent are flatenized in the object.

Any trait composition can be used to as a talent, allowing more complex talented objects.

Adding a Talent

The library provides two ways of adding a talent to an object, the first one returns a copy of the object with the new "enhanced" behavior and the second one modifies the receiver of the message.

For creating a copy you should use:

newObject := anObject copyWithTalent:aTalent

For talenting an existing object:

anObject addTalent: aTalent

As any Trait composition can be used as a Talent, we can use the operations in traits. For example, we can alias one of the selector in the talent.

anObject addTalent: (aTalent @ {#originalSelector -> #aliasSelector}) 

Removing a Talent

Removing a talent is also straight forward.

anObject removeTalent: aTalent.

If an object has more than one talent only the passed talent is removed from the object.

Composition Operations

As said before any trait composition operation can be used as talents.

When two talents are added to an object they are sequenced in a trait composition:

anObject addTalent: aTalent
anObject addTalent: otherTalent

is equivalent to:

anObject addTalent: aTalent + otherTalent.

Other more complex operations can be performed using the trait algebra. For more details check the class TaAbstractComposition.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].