words learned from The Basics of Swift

169 阅读2分钟
  • fundamental adj. 基本的
  • textual adj. 文本的
  • extensive adj. 广泛的 swift makes extensive uses of variables whose values can't be changed.
  • constant n. 常量 constants in swift are much more powerful than constants in C.
  • intent n. 意图 constants are used throughout swift to make code safer and clearer in intent when you work with values that don't need to change.
  • in addition to 除了...之外 in addition to familiar types, swift introduces advanced types not found in Objective-C, such as tuples.
  • pass around 传递 tuples enable you to create and pass around groupings of values.
  • multiple adj.多种的
  • compound adj.复合的 you can use a tuple to return multiple values from a function as a single compound value.
  • whereas conj.然而 the value of constant can't be changed since it's set, whereas a variable value can be set to different value in the future.
  • track v.记录 here's an example of how constant and variables can be used to track the number of login attempts a user has made.
  • annotation n. 注释 type annotation
  • compatible adj.一致的 you can change the value of an existing constant or variable to another value of a compatible type.
  • omit v. 删除
  • string interpolation 字符串插值
  • placeholder n.占位符
  • prompt v.提示
  • parentheses n.圆括号
  • backslash n.反斜线 swift uses string interpolation to include the name of a constant or variable as a placeholder in a long string, and to prompt swift to replace it with the current value of the constant or variable, wrap the name in parentheses and escape it with a backslash before the opening parenthesis
  • comment n. 注释
  • execute v. 执行
  • executable adj. 可执行的 use comments to include nonexecutable text in your code, as a note or reminder to yourself
  • nest v. 使嵌套 multiline comments can be nested inside other multiline comments
  • semicolon n. 分号 unlike many other languages, swift doesn't require you to write a semicolon after each statement in your code
  • fractional adj. 极小的
  • component n. 组成部分 Integers are whole numbers with no fractional component, such as 23 and -1
  • bound n. 范围 integer bound
  • access v. 访问
  • consistency n. 一致性
  • interoperability n. 可复用性 this aids code consistency and interoperability
  • precision n.精准
  • decimal n. adj. 小数 Double has a precision of at least 15 decimal digits
  • literal n. 字面量
  • performance n. 性能
  • optimization n. 优化
  • explicitly adv. 明确的 use other integer type only when they're specifically needed for the task, because of the explicitly sized data from an external data source, or for performance, memory usage, or other necessary optimization.
  • alias n. 化名 type aliases
  • permutation n. 排列 you can create tuples from any permutation of types
  • decompose v. 分解 you can decompose a tuple's content into separated constants or variables
  • underscore n. 下划线 if you only need some of the tuple's value, ignore parts of tuple with an underscore when you decompose it
  • cope v.承担 optionals can be used to cope with the absence of a value
  • obvious adj. 明确的 string "hollow" doesn't have an obvious numeric value to convert to
  • exclamation point 感叹号
  • temporary adj. 临时的
  • extract v.取出 extract the value of an optional into a constant or variable
  • implicitly adv. 不明显的, 隐式的 implicitly unwrapped optional
  • error handling 异常处理
  • encounter v.遭遇 you use error handling to respond to error conditions your program may encounter during execution
  • constrast n.比较 in contrast to
  • propgate v.传输 if necessary, propagate the error to another part of your program
  • assertion n.断言
  • precondition n.先决条件