eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBAssignmentToken':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RBAssignmentToken


Inheritance:

   Object
   |
   +--RBToken
      |
      +--RBAssignmentToken
         |
         +--RBOldStyleAssignmentToken

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-Scanner
Version:
rev: 1.9 date: 2014/12/08 17:42:41
user: cg
file: RBAssignmentToken.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Instance protocol:

private
o  length

testing
o  isAssignment

o  isOldStyleAssignment

o  value
(comment from inherited method)
return the receiver itself.
This allows every object to be used where blocks or valueHolders
are typically used, and allows for valueHolders and blocks to be
used interchangably in some situations.

Time will show, if this is a good idea or leads to sloppy programming
style ... (the idea was borrowed from the Self language).

WARNING: don't 'optimize' away ifXXX: blocks
(i.e. do NOT replace
foo ifTrue:[var1] ifFalse:[var2]
by:
foo ifTrue:var1 ifFalse:var2
)
- the compilers will only generate inline code for the if,
iff the argument(s) are blocks - otherwise, a true send is
generated.
This 'optimization' will work semantically correct,
but execute SLOWER instead.

Using constants (foo ifTrue:1 ifFalse:2) does not introduce a performance penalty.



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 16 Apr 2024 14:24:32 GMT