Skip to content

函数参数验证的最佳实践 #9

Description

@iTonyYo
  • 为每个函数提供启动 参数类型检测 功能?
  • 代码转译时检测?(Swift 是类型安全的,所以它会在编译代码时进行类型检查,并把不匹配的类型标记为错误)
  • 区分公共、私有函数,仅为公共接口进行参数类型检测?

类型检查可以帮助避免错误。

Metadata

Metadata

Assignees

Labels

dochelp wantedExtra attention is neededquestionFurther information is requested

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions