On Nov 14, 2013, at 11:21 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
On 14 Nov 2013, at 11:10, jtuchel@objektfabrik.de wrote:
Yuri,
Okay, so why not go one step further and kill PoolDictionaries? I mean, if no one uses them and you'd like to hide them from the users, they obviously are unnecessary. That would be a real cleanup, right?
Yes it would, the thing is that I had no idea what they do. And other guys from my team had no idea. And as far as I know a lot of people are not aware of them. So for me itâs ok to hide PoolDictionaries. Maybe in future they will become obsolete because of the features that Slots can provide. Maybe they will come back to life.
Yuriy have a look at Pharo by example. They should be explain. PoolDictionaries (as in Pharo) refers to special classes holding classvariables so that these variables can be statically shared (know at compiled time) between different hierarchies. For example Cr is directly used instead of having to type Text cr everywhere.
As for me, the class creation is wrong. We are not creating a method like: Object compile: 'class "Primitive. Answer the object which is the receiver''s class. Essential. See Object documentation whatIsAPrimitive."
<primitive: 111> self primitiveFailedâ
classified: #'class membership'
we just type a method.
Iâd like something user friendly for cass like: - select a superclass - give your class a name - add instance variable * name variable * choose variable type - add class variable⦠- add pool dictionary
I think that you get the idea
PoolDictionaries are potentially dangerous, because you can put things there that make Images harder to reproduce if you don't put the code to fill the Dictionaries into some script that will be run in the right situations (places like #loaded in envy).
Joachim
Am 14.11.13 11:05, schrieb Yuriy Tymchuk:
On 14 Nov 2013, at 11:02, jtuchel@objektfabrik.de wrote:
Hi,
I'd like to draw your attention to something else: consistency.
I remember the days when Cincom added Namespaces to classes and the class definition template changed drastically. It took me quite a while to get used to that. And there is this other aspect in the consistency field: most Smalltalk literature will include and address that line. If you learn Smalltalk, such small differences can cause trouble. Is anything mentioning PoolDictionaries? I have no idea what it is.
The other thing is that we should go from text for class creation to nice ui, but itâs a long term goal.
And what if I need PoolDictionaries? How hard will it be to find the place to add my reference to them? A fair amount of Pharo code may not make much use of PoolDictionaries, but other dialects do. I know Pharo has the concept of "never look back" and it is good to be prepared to cut off old strings. But there is a price to it.
Seaside, apart from being a great web framework, has achieved something that was excellent and helped the whole Smalltalk universe make a leap forward: all Smalltalk dialects moved closer together and honestly worked on being more compatible. Suggestions like this may not break much of this per se, but many such cracks make a wide canyon. I find the argument that a certain line of code may irritate students a bit weak. It may make their life harder once they read code from other dialects. Should we remove class browsers because students are used to use text editors?
Just my 2 cents
Joachim
Am 14.11.13 10:49, schrieb Martin Dias:
+10
On Tue, Nov 12, 2013 at 9:24 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
+1
On Nov 12, 2013, at 4:39 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hi all,
I am preparing slides for a course. I came to the typical:
Number subclass: #Complex instanceVariableNames: 'real imaginary' classVariableNames: '' poolDictionaries: '' category: 'ComplexNumbers'
Which made me think: Who uses poolDictionaries? I suspect extremely few of us.
Why not add this to Class: Class>>subclass: aSymbol instanceVariableNames: instVarNames classVariableNames: classVarNames category: aSymbol ^self subclass: aSymbol instanceVariableNames: instVarNames classVariableNames: classVarNames poolDictionaries: '' category: aSymbol
And have the new class template as follows?
Object subclass: #NameOfSubclass instanceVariableNames: '' classVariableNames: '' category: 'Kernel-Classes'
It would be a bit cleaner. I know us old timers don't even see the poolDictionaries: line anymore, but I dislike having to explain it to students.
Greetings,
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
-- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
-- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1