Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007767 [Squeak] Traits minor always 06-04-13 13:43 07-03-16 04:29
Reporter FrankShearar View Status public  
Assigned To FrankShearar
Priority normal Resolution fixed  
Status resolved   Product Version trunk
Summary 0007767: - does not respect brackets
Description In the composition (S + T) - m, where m is a set of excluded selectors, m is not removed from the TraitComposition (S + T), but only from T.
Additional Information
Attached Files

- Relationships

- Notes
(0014569 - 447 - 603 - 603 - 603 - 603 - 603)
Patrickr
11-18-15 15:21

Does anyone have a strong opinion on this one? The behavior was intended like that as can be seen in this method:

TraitComposition>>#- anArray
    "the modifier operators #@ and #- bind stronger than +.
    Thus, #@ or #- sent to a sum will only affect the most right summand"
    
    self addLast: (self removeLast - anArray)

However, this violates the normal evaluation order of Squeak Smalltalk, so I would propose, that we remove this behavior.
 
(0014571 - 221 - 233 - 443 - 443 - 443 - 443)
FrankShearar
11-18-15 15:29

I asked the Pharo guys (where most of the people who wrote the papers on Traits hang out), and their reply is here: http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2013-June/080155.html [^]

The gist? It's a bug.
 
(0014572 - 357 - 478 - 478 - 478 - 478 - 478)
Patrickr
11-18-15 15:42

Thanks for the hint :)

So, I am going to change this to the Pharo equivalent but without the comment which is kind of confusing, as the behavior does not look like #- would bind stronger than #+ anymore.

- anArray
    "the modifier operators #@ and #- bind stronger than +"
    
    self transformations: (self transformations collect: [ :t | t - anArray ])
 
(0014591 - 614 - 701 - 977 - 977 - 977 - 977)
lewis
07-03-16 04:29

Patrick Rein uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-pre.307.mcz [^]
 
==================== Summary ====================
 
Name: Traits-pre.307
Author: pre
Time: 20 November 2015, 2:58:26.562 pm
UUID: f0955b2d-775c-4862-85b9-5d6e616cd2e4
Ancestors: Traits-eem.306
 
This fixes http://bugs.squeak.org/view.php?id=7767 [^] which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the
+normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated.
 

- Issue History
Date Modified Username Field Change
06-04-13 13:43 FrankShearar New Issue
06-04-13 13:43 FrankShearar Status new => assigned
06-04-13 13:43 FrankShearar Assigned To  => dvf
06-04-13 13:43 FrankShearar Assigned To dvf => FrankShearar
11-18-15 15:21 Patrickr Note Added: 0014569
11-18-15 15:29 FrankShearar Note Added: 0014571
11-18-15 15:42 Patrickr Note Added: 0014572
07-03-16 04:29 lewis Status assigned => resolved
07-03-16 04:29 lewis Resolution open => fixed
07-03-16 04:29 lewis Note Added: 0014591


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
51 total queries executed.
38 unique queries executed.
Powered by Mantis Bugtracker