w- function type of
return dynamic type of value , แสดงว่ามี return static type ?
func type(of value: T) -> Metatype
type(of:) ~ ใช้หา dynamic type ,เมื่อแตกต่างกับ static type
static type – รู้เพราะเป็น compiler-time
ส่วน dynamic type -รู้ตอน run-time และเป็น subtype of concrete type

yt – Learn to write generic framework methods with swift: Cast & typeOf
extension method คือ convert จาก array to another type

Discover more from อรรถพรคลินิก ศัลยกรรมตกแต่ง Attaporn Plastic Surgery clinic 阿塔蓬博士,曼谷整形外科医生

Subscribe now to keep reading and get access to the full archive.

Continue reading