Xah Talk Show 2025-02-28 Ep621 Wolfram language coding, geometry, parabola caustics, progn, CompoundExpression


// what is the significance of curly braces in c-like syntax langs

if (false) {
  console.log("is true");
  console.log("and i love u");
} else {
  console.log("i hate u");
  console.log("ok?");
}
(progn
  (message "hello")
  (message "world")
)

(if t
    (progn
      (print (format "hello world"))
      (print (format "love u")))
  (progn
    (print (format "hate u"))))
If[ True ,
 CompoundExpression[
  Print[ "hi" ],
 Print[ "i love u" ]
] ,
Print[ "i hate u" ]
]

If[ True ,
  Print[ "hi" ];
 Print[ "i love u" ] ,
Print[ "i hate u" ]
]

CompoundExpression[a,b]
a;b
(+ 1 (* 2 3) 4 (+ 5 6))
;; 22
console.log(  1 + 2 * 3 + 4 + (5 + 6) )
// 22