Delegation trong Kotlin và các hạn chế
Kotlin hỗ trợ ta implement pattern Delegation. Nó giúp ta không phải viết nhiều code. Nhưng ta phải chú ý tới những hạn chế của tính năng này.
About technology stuff that piqued my interest
Kotlin hỗ trợ ta implement pattern Delegation. Nó giúp ta không phải viết nhiều code. Nhưng ta phải chú ý tới những hạn chế của tính năng này.
Kotlin has great support for implementing the delegation pattern. But we must be mindful of its limitations and pitfalls.
Null safety trong Kotlin có vẻ đã bổ sung thêm kiểu dữ liệu cho JVM. Trong bài hôm nay, ta sẽ tìm hiểu xem tính năng đó thực ra được implement bằng cách nào.
At first glances, null safety in Kotlin seems to add new types to the JVM. In this article, we will take a deep dive and see how it is actually implemented.
Trong bài hôm nay, chúng ta sẽ tìm hiểu cách xử lý exception xảy ra trong coroutine con của các coroutine tạo bởi launch builder.
In today’s article, we will look at how to handle exceptions occurred inside children of coroutines created by the launch builder.
Trong Kotlin ta không thể sử dụng type information của hàm generic tại runtime. Trừ phi ta dùng từ khoá reified trong hàm inline.
Due to type erasure, we cannot access type information of generic methods at runtime. Unless we use the reified keyword inside an inline method.
FastAndFaster is a library to create objects and invoke their methods using dynamic code generation. Its performance is very close to static C# code.
Thư viện FastAndFaster sử dụng dynamic code generation để tạo object và gọi hàm của chúng tại runtime. Tốc độ của nó không thua gì static code.