sorry for this i mixed up the mailing adresses :D On Sat, Dec 21, 2013 at 11:04 AM, dimitris chloupis <thekilon@yahoo.co.uk>wrote:
ÏÏειλε Î¼Î¿Ï Ïην Ïάλι ÏÏο kilon.alios@gmail.com γιαÏί ÎµÎ´Ï Î¼ÏÎ±Î¯Î½Ï ÏλÎον ÏÏάνια και για κάÏοιο λÏγο δεν Î¼Î¿Ï ÎºÎ±Ïεβάζει Ïο αÏÏείο ÏÎ¿Ï . ΣÏÏÏÏ ÏÎ¿Ï Ïε ξÎÏαÏα ÏιλαÏάκι αλλά Î±Ï Ïή Ïην εβδομάδα δεν Î®Î¼Î¿Ï Î½ και ÏÎ¿Î»Ï ÏÏα καλά Î¼Î¿Ï . ΣÏην είÏα να Ïην γÏάÏÎµÎ¹Ï ÎÏÏι για Ïο ÏÏ ÏÎ¹ÎºÏ ÏÎ·Ï Ï ÏÏθεÏÎ·Ï , νομικά δεν Ïαίζει μεγάλο ÏÏλο αÏο Ïην ÏÏιγμή ÏÎ¿Ï ÎÏÎ¿Ï Î½ λάβει γνÏÏη δηλαδή γνÏÏÎ¯Î¶Î¿Ï Î½ Ïην ÏεÏίÏÏÏÏη ÏÎ¿Ï .
On Friday, 13 December 2013, 23:29, Tudor Girba <tudor@tudorgirba.com> wrote: Hi Esteban,
Indeed, I pondered on the issue of extending Object with the deep* methods. In the end, I chose to extend it because traversals are not a cherry on top, they are rather essential for significant analysis.
From my point of view, Pharo has to become a platform in which understanding and manipulating objects is an essential concern. The reason is that in the long run, it is precisely assessment-related activities that account for the largest development costs. I detailed a bit this idea here:
http://www.humane-assessment.com/blog/choose-your-technology-for-the-long-ru...
For this we need a powerful toolkit that makes crafting custom analyses cheap, and traversals has a prominent place in it.
Cheers, Doru
On Fri, Dec 13, 2013 at 6:17 PM, Esteban A. Maringolo < emaringolo@gmail.com> wrote:
To avoid such kind of situations I would implement all the traversal methods as a) Traits or b) Class side methods of DeepTraversal (you choose the name) to which you'll have to pass the collection and the block.
E.g. DeepTraversal deep: aCollection do: aBlock DeepTraversal flatten: aCollection thenDo: aBlock
I, personally, don't like adding methods to Object unless it's unavoidable(*). And in those cases I choose to prefix them with something that is separate from the semantic, usually the package/framework prefix.
Regards,
(*)I did that for years and in the long term it hits you back. Esteban A. Maringolo
2013/12/13 Chris Cunningham <cunningham.cb@gmail.com>:
Hi.
I was reading with interest the blog post on Traversal-enabled objects ( http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects ) when I noticed the method #deepCollect: referenced. Interestingly, I have a method called #deepCollect: that is use (wtih related methods like #deepDo: and #deepSelect:). I suspect these uses may be compatible, with the traveral versions being more generic.
My set of #deep methods allow arbitrary flattening of collections. The #flatCollect: suite in Pharo today flattens objects 1 level; the #deepCollect: flattens the collections as many levels deep as they are nested. I found this to be a really useful ability when I work with PetitParser parsings, which tend give back massively nested Arrays by default.
If you are interested, it is published at: http://www.smalltalkhub.com/#!/~cbc/DeepCollection/ .
-cbc
-- www.tudorgirba.com
"Every thing has its own flow"