Skip to content

Files

Latest commit

 

History

History
33 lines (18 loc) · 556 Bytes

joined_default_parameter.md

File metadata and controls

33 lines (18 loc) · 556 Bytes

Pattern: Explicit use of default separator

Issue: -

Description

Use to discourage explicit usage of the default separator.

Examples of correct code:

let foo = bar.joined()


let foo = bar.joined(separator: ",")


let foo = bar.joined(separator: toto)

Examples of incorrect code:

let foo = bar.joined(separator: "")


let foo = bar.filter(toto)
             .joined(↓separator: "")

Further Reading