libextobjc 优点

 * **Simpler and safer key paths**, using EXTKeyPathCoding, which automatically checks key paths at compile-time.

libextobjc (0.2.5)
   A Cocoa library to extend the Objective-C programming language.
   - Homepage: https://github.com/jspahrsummers/libextobjc
   - Source:   https://github.com/jspahrsummers/libextobjc.git
   - Versions: 0.2.5, 0.2.4, 0.2.3, 0.2.0, 0.1.0 [master repo]



1.使用@keypath 允许在编译期验证 key paths。

2.通过对象.属性指定 keypath 不再是字符串了。

3. * @code


NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String);


//可以观察 类方法变量了?这个要试试看

NSString *versionPath = @keypath(NSObject.class, version);


4.使用refactoring 修改变量名称时,keypath 也会同时更新。

5.避免了原来字符串指定keypath时,可能忘记修改keypath引起的错误。



The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other dynamic programming languages (including those that are not necessarily object-oriented).

libextobjc is meant to be very modular – most of its classes and modules can be used with no more than one or two dependencies.

Please feel free to open issues for feature requests or ideas for language extensions (even if you have no idea how they'd work)!
Thunder Download Plugin
Thunder Download Plugin
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值