最終更新日:2025/12/04
(programming, informal) A logical condition with the usual order of operands reversed — e.g. if (18 == age) rather than if (age == 18) — for various reasons, such as avoiding accidental misuse of = (assignment) instead of == (equality), a mistake that is harder to spot when using the normal order of operands.
音声機能が動作しない場合はこちらをご確認ください
正解を見る
Yoda condition
編集履歴(0)
元となった辞書の項目
Yoda condition
名詞
くだけた表現
(programming,
informal)
A
logical
condition
with
the
usual
order
of
operands
reversed
—
e.g.
if
(18
==
age)
rather
than
if
(age
==
18)
—
for
various
reasons,
such
as
avoiding
accidental
misuse
of
=
(assignment)
instead
of
==
(equality),
a
mistake
that
is
harder
to
spot
when
using
the
normal
order
of
operands.
日本語の意味
プログラミングにおける論理条件を表現する手法の一つで、通常のオペランドの順序(例: if(age == 18))の代わりに、オペランドの順序を反転させた条件式(例: if(18 == age))を書く方法。これは、代入演算子(=)と等価演算子(==)の誤用を防ぐために利用される。
意味(1)
(programming,
informal)
A
logical
condition
with
the
usual
order
of
operands
reversed
—
e.g.
if
(18
==
age)
rather
than
if
(age
==
18)
—
for
various
reasons,
such
as
avoiding
accidental
misuse
of
=
(assignment)
instead
of
==
(equality),
a
mistake
that
is
harder
to
spot
when
using
the
normal
order
of
operands.
( plural )