本文为Swift编程语言中文教程第二十部分,讲解扩展(Extensions),内容包括:Swift扩展语法(Extension Syntax)、计算型属性(Computed Properties)、构造器(Initializers)等。
基于16个网页-相关网页
使用数据库支持的函数作为查询表达式来扩展语法。
Using a database-supported function as a query expression to extend the grammar.
本文将介绍基本的语法,以及它和扩展语法之间的不同之处。
Basic syntax is described here, along with the differences between it and extended syntax.
两者结合使用可方便地定义新语句,无需扩展语法,也无需使用类似宏的元编程工具。
A joint use of both features facilitates the definition of new statements without extending the syntax and without using macro-like meta-programming facilities.
应用推荐