Stream: ideas

Topic: ✔ remove if to promote tags


view this post on Zulip Kilian Vounckx (Dec 14 2024 at 21:45):

Brendan Hansknecht said:

Bool:

Side question, probably should be a different topic. Should we remove if (like gleam), to encourage to use tags more?

view this post on Zulip Brendan Hansknecht (Dec 14 2024 at 21:48):

What do you do for if x > 3 then

view this post on Zulip Notification Bot (Dec 14 2024 at 21:49):

2 messages were moved here from #contributing > Strengths of each primitive/builtin Roc type by Brendan Hansknecht.

view this post on Zulip Anthony Bullard (Dec 14 2024 at 21:51):

Brendan Hansknecht said:

What do you do for if x > 3 then

when x > 3 is
  True -> ...
  False -> ...

Or something else similar. Not campaigning for it. But it's a thing that could be done (and what I was doing in Chakra).

view this post on Zulip Luke Boswell (Dec 14 2024 at 21:52):

I like the feel of if then else and use it frequently.

view this post on Zulip Ayaz Hafiz (Dec 14 2024 at 21:52):

I don't think this is worth it - it adds overhead to a familiar concept. It also doesn't work well with early returns, which Roc now has

view this post on Zulip Anthony Bullard (Dec 14 2024 at 21:54):

@Ayaz Hafiz That's surprising that early returns don't work in when .. iswhen that is really just sugar over some complex and sometimes low-level if statements

view this post on Zulip Brendan Hansknecht (Dec 14 2024 at 21:59):

Yeah, this sounds not at all worth it to me. If is useful. Bool.true already does enough to stop most people from wanting to use bool.

view this post on Zulip Kilian Vounckx (Dec 14 2024 at 22:09):

I don't want it either. Some people just seem to like it in gleam, so I thought I'd bring it up

view this post on Zulip Richard Feldman (Dec 14 2024 at 23:17):

this may be the first time we've had an #ideas topic where even OP doesn't want it :joy:

view this post on Zulip Sky Rose (Dec 17 2024 at 16:27):

This question has come up before. It's tempting to make the language simpler, but I think it'd be a big hit to the weirdness budget. Beginners would all have to ask how to do an if, or just bounce off the language if they can't figure it out.

view this post on Zulip Notification Bot (Dec 17 2024 at 16:27):

Sky Rose has marked this topic as resolved.


Last updated: Jun 16 2026 at 16:19 UTC