Re: [Pharo-project] Unicode depending on Zinc
On Mar 16, 2012, at 12:24 AM, Igor Stasenko wrote:
you can always make dependency less hardcoded:
Smalltalk at: #ZnClient ifAbsent: [ self error: 'sorry dude' ] ifPresent: [:client | ... download stuff , whatever ]
Why don't we make that the default? That is, compile all globals to something like "self environment lookUp: #ClassName" ? Marcus -- Marcus Denker -- http://marcusdenker.de
On Fri, Mar 16, 2012 at 8:20 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
On Mar 16, 2012, at 12:24 AM, Igor Stasenko wrote:
you can always make dependency less hardcoded:
Smalltalk at: #ZnClient ifAbsent: [ self error: 'sorry dude' ] ifPresent: [:client | Â ... download stuff , whatever ]
Why don't we make that the default? That is, compile all globals to something like "self environment lookUp: #ClassName" ?
In general it will lead to unimplemented calls so it is always better to solve it with polymorphism. However we need some standard way how to work with that. - the expression "self environment" is not good because the message #environment is defined only in classes and for nil, not in Object. - we should rise a standard exception with default action taken from UIManager. - there should be an optional variant messages that take a package name as an argument so the error handling will be able to tell user what package should be installed. -- Pavel
    Marcus
-- Marcus Denker -- http://marcusdenker.de
On Mar 16, 2012, at 9:26 AM, Pavel Krivanek wrote:
- the expression "self environment" is not good because the message #environment is defined only in classes and for nil, not in Object.
environment is for classes not object. = namespace. Marcus your solution is interesting (I would like to know how much it costs) Now for our question it just avoids the the hardcoding but it the code it no present â¦. in VW they have {Core.Zinc} for: [:each | â¦] (I do not have the exact message) now we could have the same. Still it means that using a lot such constructs will put a lot of optionally deadcode in the system. Stef
participants (3)
-
Marcus Denker -
Pavel Krivanek -
Stéphane Ducasse