DEV Community

Vee Satayamas
Vee Satayamas

Posted on

Common Lisp ไม่ใช่ระบบแบบที่ปล่อยให้ตายง่าย ๆ

Common Lisp เป็นระบบที่ไม่ตายง่าย ๆ ถ้าโปรแกรมที่เราใช้รันที 0.5 วินาที ก็คงไม่เป็นไร แต่ถ้าเริ่มโหลด data สัก 10 นาทีแล้วถึงจะทำงานต่อได้ หรือโปรแกรมต้องรันต่อกันสามวันก็คงไม่อยากจะเริ่มใหม่บ่อย ๆ จะ save state ลง disk กันบ่อย ๆ โปรแกรมก็เสร็จช้าเข้าไปอีก

Common Lisp เวลาเกิดข้อผิดพลาด กดจะส่งสัญญาณ (signal ที่เป็น verb) ที่มีสภาวะ (condition) ของข้อผิดพลาดและสภาวะแวดล้อมของข้อผิดพลาดแนบไปด้วย ตัวรับสัญญาณที่กำหนดไว้ก่อนว่าสภาวะไหนให้ทำอะไรก็ทำงานได้สารพัด ตั้งแต่พิมพ์อะไรออกมาบอกเฉย ๆ หรือกระโดดข้ามบางส่วน กลับไปทำโปรแกรมซ้ำอีกครั้ง หรือจัดการไม่ได้มันจะไปเรียก debugger ถามคนที่อยู่หน้าจอว่าให้ทำอะไรต่อ ส่วนที่ให้ถามว่าทำอะไรต่อก็กำหนดไว้ก่อนได้ว่าจะให้ทำอะไร เลือกแผน B แผน C ได้ มากไปกว่านั้นถ้าคนที่อยู่หน้าจอเป็น programmer ก็แก้โปรแกรมบางส่วนแล้วสั่งให้รันต่อได้

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay