DIFF.BLOG
New
Following
Discover
Jobs
More
Top Writers
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up  
Topics
The largest independent dev blog feed.
We surface the best developer writing from thousands of independent blogs, updated daily. The open web is worth fighting for.
Join now
→
Learn more
TOPICS
Kotlin 填坑记之 Compatibility
1
·
Johnson Lee
·
Dec. 7, 2022, midnight
Summary
在前一篇 Kotlin 填坑记之 FunctionReference 中有提到关于如何解决 Kotlin 从 1.3 升级到 1.5 时由 FunctionReference 引发的兼容性问题,其实,Kotlin 的兼容性问题远不只这一个,如何系统性的解决 Kotlin 的兼容性问题呢? 什么是兼容性问题 软件的兼容性问题大致可以分为两类:API 兼容性和 ABI 兼容性。 API (Application Programming Interface) 兼容性 简而言之,就是接口的兼容性,大致也分为两类: API 废弃 (Deprecation) 比如:Kotlin 1.5 废弃了 String.toUpperCase() API,由 String.uppercase() 替代。尽管 API 废弃了,要用还是可以继续用的,只不过编译器会有警告,但不会中断编译过程。 API 删除 (Removal) 比如:JDK 11 删除了 Thread.destroy() 和 Thread.stop(Throwable) API,如果工程里用了 Thread.destroy() AP...
Read full post on johnsonlee.io →
Submit
AUTHOR
RECENT POSTS FROM THE AUTHOR