if
#### # #### #### ## ## # ###### ###### #### # # ######
# # # # # # # # # # # # # # # # ## # #
# # # # # # # # # # ##### ##### # # # # # #####
# ### # # # # ###### ###### # # # # # # # # #
# # # # # # # # # # # # # # # # # ## #
#### # #### #### # # # # # # # #### # # ######
>>> CLICCA PER GIOCARE GIOCA A IFFONE <<<
if?
La funzione if è il cuore della logica computazionale. È il punto in cui un programma
prende decisioni e cambia direzione. Dai primi linguaggi come Fortran fino a Python e JavaScript,
if ha guidato miliardi di scelte nel codice.
"Give me a loop and I will iterate the world. Give me an if, and I will decide its fate." — Un programmatore, probabilmente
"if is where code begins to think." — Alan Turing (forse, in un universo parallelo)
ifif risale al linguaggio Fortran nel 1957. Una versione primitiva era: IF (X .GT. 0) GOTO 100if: "If you take the blue pill..."one-liner così: print("42") if True else print("nope")IfBut che usa solo if e but
if ( ☕ )
┌────┐
│yes │→ continue coding;
└────┘
else
┌────┐
│no │→ get coffee;
└────┘
// Bash
if [ -f "/etc/magic" ]; then
echo "You're in the wizard's domain.";
fi
// JavaScript
if (typeof love === 'undefined') {
throw new Error("Define your passion.");
}
// Python
if not sleeping:
print("Time to dream in code.")