GithubHelp home page GithubHelp logo

turingwechatgroups's Issues

Swift 编程权威指南 第14章 递归枚举问题

在代码清单14-30 尝试定义FamilyTree 的代码后的第三段,提到ShapeDimensions实例的实际大小是17字节:足以装下rectangle的空间;ShapeDimensions实例的实际大小是17字节是从哪得出来的呢?

Swift 编程权威指南 第14章 枚举问题

代码清单14-8 增加成员值

enum TextAlignment {
    case left
    case right
    case center
    case justify
}

var alignment = TextAlignment.leftjustify
alignment = .right~~
...

注意,代码尽管还能运行,但是会输出错误的值。alignment变量设置为justify,但是switch语句打印了center aligned。这就是默认分支不面向未来的意思:这样做会增加未来修改代码的复杂度。

感觉这句话有问题(var alignment = TextAlignment.leftjustify) 而且这段文字不知道要表达什么

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.