تَتَوَقَّع بُنية if الخاصَّة بِـ Egg ثلاثة جدليَّات. فهي ستُقَيِّم الأولى، وإذا لم تكن النتيجة هي القيمة "خطأ" false، عندها ستُقَيِّم الثانية. وإلَّا، ستُقَيَّم الثالثة. إنَّ صيغة if هذه أشبه بثُلاثِيَّة الجافا سكرِبت ؟: فهي مُعَامِل operator أكثر من if الخاصَّة بِالجافا سكرِبت. وهي تعبير expression وليست إفادة statement، وَتنتج قيمة، ما يعني، نتيجة الجدليَّة الثانية أو الثالثة.

تختلف Egg عن الجافا سكرِبت بطريقة إستيعاب قيمة الشَّرط if. فلن تعامل الأشياء مثل الصفر أو السلسلة النصيَّة الفارغة كَـخطأ false، بل تعامل هكذا القيمة خطأ المحدَّدة بدقَّة.

سبب حاجتنا لتمثيل if كَصيغة خاصَّة special form، أكثر منه كَدالَّة إعتياديَّة، هو أنَّ كل جدليَّات الدَّوال تُقَيَّم evaluated قبل أن تُستدعى الدالَّة function، بينما يجب على if أن تقيِّم فقط إمَّا جدليَّتها الثانية أو الثالثة، إعتمادًا على قيمة الأولى.

إنَّ صيغة "طالما" while مُشابهة.

النص الأصلي:

Egg’s if construct expects exactly three arguments. It will evaluate the

first, and if the result isn’t the value false, it will evaluate the second.

Otherwise, the third gets evaluated. This if form is more similar to

JavaScript’s ternary ?: operator than to JavaScript’s if. It is an expres-

sion, not a statement, and it produces a value, namely, the result of the

second or third argument.

Egg differs from JavaScript in how it handles the condition value to if.

It will not treat things like zero or the empty string as false, but only

the precise value false.

The reason we need to represent if as a special form, rather than a

regular function, is that all arguments to functions are evaluated before

the function is called, whereas if should evaluate only either its second

or its third argument, depending on the value of the first.

The while form is similar.