[Pharo-project] Case statement and lazy comparison in Pharo
epicfan at gmail.com
Mon Mar 15 17:49:12 EDT 2010
Well, perhaps is a theme worked in another times but... is possible for Pharo
have a basic Case or elseIf statement? I know is easy create you own
structure control, but not is more useful have a "standard" for everybody?
I´m tired of write code like that...
(self currentRow == sortedRows last and: [ self
currentCell isNil ]) ifTrue:
self navigationKey: event
(self currentRow notNil and: [ self currentCell isNil ]) ifTrue:
(self currentRow notNil and: [ self currentCell notNil ]) ifTrue:
self currentCell notNil ifTrue:
self currentCell performKeyFocus: event inCellBounds: (self
pvtGetCellBounds: self currentCell).
Write code with that format is pathetical :(
Is valid too have a "and" and "or" lazy? Exists a not lazy with #& and #| ,
but could exists an #&& and #|| . Is more easy...
value1 == value2 and:[ <condition> ] and: [<condition>] ......
value1 == value2 && <condition> && <condition> ......... ???
Well, perhaps is a stupid question but I miss a more complete way for write
code. If in Smalltalk is possible do easy that and include it in "core" why
not do it?
Is a reasonable desire :)
View this message in context: http://n4.nabble.com/Case-statement-and-lazy-comparison-in-Pharo-tp1594080p1594080.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
More information about the Pharo-dev