4 ms·
If you look at the linked issue, you will see that it is a type intersection issue (a real language issue) mischaracterized as a control-flow bug. Many readers
by ViralBShah 4y ago
If you look at the linked issue, you will see that it is a type intersection issue (a real language issue) mischaracterized as a control-flow bug. Many readers here seem to see that and believe that if statements in Julia are broken - no that is not the case.
- anonymoushn 4y agoAs an end user it may be hard for me to accept that there are no control-flow bugs involved when this code println(flag) if flag println("flow for true.") else println("flow for false.") end prints false flow for true.
- oivey 4y agoI pasted that code into a REPL (including setting flag=false, which seems to be implied) and got: false flow for false. How did you get your output? Your post implies that if statements are broken in Julia. Untrue.
- jakobnissen 4y agoIt is from the top comment in https://github.com/JuliaLang/julia/issues/41096 https://github.com/JuliaLang/julia/issues/41096