Dev Vocab

คำศัพท์เกี่ยวกับการเขียนโปรแกรม

(เข้าสู่ระบบ เพื่อบันทึกคำที่จำได้)

implementation

implementation = n.

implement = (vt.) use

§ Mental Model

เรามักจะได้ยินคำว่า implementation detail

ตัวอย่างเช่น

function circle_area(radius: number): number {
  return Math.PI * radius * radius // บรรทัดนี้คือ implementation detail ของ circle_area function
}

// เมื่อเรียกใช้ circle_area function เราไม่จำเป็นต้องสนใจ implementaion detail ว่าตัวฟังก์ชัน ใช้สูตรอะไรในการคำนวณหา output ออกมา
circle_area(1) // 3.141592653589793
circle_area(2) // 12.566370614359172

พูดง่ายๆว่าเมื่อเราพูดว่า implement the function คือ เรากำลังเขียน function นั้นๆออกมา

detail = (n.) รายละเอียด

implementation = (n.) วิธีการ

สรุปคือ ให้เราเรียกคำๆนี้แบบทับศัพท์ไปเลย ไม่ต้องแปลเป็นไทยในใจ

ให้นึกถึง implementation detail ของ function