Skip to content

Boolean if CodeBlock pattern is confusing #39

Description

@rrezel

Wouldn't it be better to call this operation then? So
<boolean> then <codeblock>
and
<boolean> then <codeblock>, else <codeblock>


if what?

<boolean> ifTrue: <codeblock> ifFalse: <codeblock>

<boolean> ifTrue: <codeblock> 

<boolean> ifFalse: <codeblock>

Smalltalk-80


(n == 2) if This is bizarre. Why are you using your language strangeness budget on something that is no shorter and a good deal less obvious what it's doing (you have to finish reading the line before you learn the most important piece of information about the line). if n == 2 would be much better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions