gilbert189 — 3/8/2024, 12:16:33 AM

is there a programming language that doesn’t support else if at all

not even as the sneaky “second if is inside else

♥ 3 ↩ 0 💬 3 comments

comments

donotforgetmycode:

I don’t think ORK even has else

3/13/2024, 1:16:58 PM
landonhere:

I'd say that, as long as a programming language supports IF, AND and NOT, then there should be a workaround for ELIF in there somewhere. For example,

IF (BOOL-A) {
  FUNCTION(A)
} ELIF (BOOL-B) {
  FUNCTION(B)
} ELSE {
  FUNCTION(C)
}

could be worked around like this:

IF (BOOL-A) {
  FUNCTION(A)
}
IF (!BOOL-A && BOOL-B) {
  FUNCTION(B)
]
IF (!BOOL-A && !BOOL-B) {
  FUNCTION(C)
}
3/9/2024, 5:15:41 PM
mybearworld:

Gleam doesn’t have else at all

3/8/2024, 1:17:09 PM