Stream: ideas

Topic: Mapping from (and to?) common features in other languages


view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:08):

As a pebble (a Roc newbie, I'm trying to get the name to catch on), I find myself repeatedly searching for functions I commonly use in other languages, for example concatMap seems to be named joinMap, filter is keepIf, foldl is walk, and so on. The Roc names are arguably clearer, and therefore better for people who are new to programming, but I wish there was a glossary. Sometimes I'm not sure whether I've missed something, or whether it just hasn't been implemented yet (e.g., I can't find List.zip). If there was a page on the website with a bunch of commonly used functions from other languages and their equivalent in Roc, I would find it really useful. I'm happy to contribute a first version, if you want.

view this post on Zulip Anton (Jul 30 2024 at 09:09):

We do have one, but it is easily missed: https://www.roc-lang.org/different-names

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:10):

Oh wow, that's exactly what I was looking for. I'm sorry I missed it, where is it linked on the website?

view this post on Zulip Anton (Jul 30 2024 at 09:11):

It's linked on https://www.roc-lang.org/builtins in the tip in the bottom left

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:12):

Oh wow, it's right there, I never noticed it, and I've been on this page a lot. Sorry for the noise!

view this post on Zulip Anton (Jul 30 2024 at 09:13):

Not at all, it is too easily missed, we've talked about potential improvements, let me see if I can find it

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:14):

Actually, I've been there a lot, but I always immediately click on Str or List or others. Perhaps it would be better to have that link on each of the relevant pages, closer to the top?

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:15):

Actually, it might be more useful to add the appropriate comment to each function, similar to the concatMap comment in joinMap. For example, keepIf could have the comment that it's named filter in many languages.

view this post on Zulip Anton (Jul 30 2024 at 09:17):

I originally thought to augment the search box, so that if you enter for example fold, it guides you to walk. But there are several possible improvements to make as you suggested

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:18):

The search box would be awesome

view this post on Zulip Anton (Jul 30 2024 at 09:19):

Perhaps for an easy first improvement we move the tip with the link between search and Str?

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:20):

Yes, just below the Search, that would be cool. To be honest, I just noticed the search box now, I must be blind.

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:20):

Btw, where's the repo for the website? The concatMap name is missing from the different-names page, I can push a PR.

view this post on Zulip Anton (Jul 30 2024 at 09:21):

It's in the main repo at roc/www/public/different-names/index.html

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:22):

Oh cool, I thought it would be in its own repo, got it.

view this post on Zulip Anton (Jul 30 2024 at 09:22):

I just noticed the search box now, I must be blind.

Totally normal, others have missed it too, we've also talked about centering it and making it way larger

view this post on Zulip Anton (Jul 30 2024 at 09:23):

#5220

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:23):

Thanks again Anton!

view this post on Zulip Aurélien Geron (Jul 30 2024 at 09:38):

#6939


Last updated: Jun 16 2026 at 16:19 UTC