V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
lldong
V2EX  ›  iDev

LLVM 4.0 带来的Objective-C新特性,代码又可以简洁一些了!

  •  
  •   lldong ·
    lldong · 2012-02-17 00:55:03 +08:00 · 4784 次点击
    这是一个创建于 4459 天前的主题,其中的信息可能已经有所发展或是发生改变。
    LLVM 4.0 Compiler

    • Default @synthesize: automatically synthesizes an @property when unimplemented

    • Objective-C literals: create literals for NSArray, NSDictionary, and NSNumber, just the same as the literals for NSString

    • Objective-C container subscripting: use '[]' syntax to access containers such as NSArray and NSDictionary
    5 条回复    1970-01-01 08:00:00 +08:00
    snx
        1
    snx  
       2012-02-17 14:29:14 +08:00 via iPhone
    看似省了 [dict objectForKey: @"a"] 為 dict[@"a"]
    levey
        2
    levey  
       2012-02-17 14:36:50 +08:00
    llvm.org上没这新闻,你是哪里看到的。。。
    ant_sz
        3
    ant_sz  
       2012-02-17 14:54:19 +08:00
    变得越来越像CPP了。。。

    看来CPP还是很经典的么。。。

    不过cpp貌似不允许在[]里填字符串,恩恩,应该说转变的更像python
    lldong
        4
    lldong  
    OP
       2012-02-17 16:05:51 +08:00
    @snx 还有创建NSArray和NSDictionary,NSNumber也能像创建NSString那样方便了
    @levey Xcode 4.4 Release Note
    @ant_sz 我觉得越来越像Ruby
    elden
        5
    elden  
       2012-02-17 16:22:39 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2150 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:48 · PVG 23:48 · LAX 08:48 · JFK 11:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.