Google Dart adds extension methods

With Dart 2.7 released this week, the Google-developed programming language adds extension methods, allowing developers to add functionality to any type—even to types not under the developer’s control. 

Extension methods have the brevity and auto-complete experience of regular method calls. An example provided in a Google bulletin on the Dart 2.7 release illustrates how developers could extend the String class. Developers in the Dart community already have been experimenting with extension methods, including development of a time package using extensions on numcode, the base class for ints and doubles, for the construction of Duration objects.

To read this article in full, please click here

分類: Android News 安卓新聞, IT 資訊科技(信息技术), 熱門新聞,標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 。這篇內容的永久連結