Stream: ideas

Topic: Str naming convention


view this post on Zulip Brendan Hansknecht (Jun 21 2023 at 04:40):

Just notice this minor naming discrepency. Should it be Encode.str or Encode.string?

https://github.com/roc-lang/roc/blob/5cafc50a506c5154a733c86696a98cb4bd2cfe70/crates/compiler/builtins/roc/Encode.roc#L21

view this post on Zulip Luke Boswell (Jun 21 2023 at 05:55):

I guess maybe bool should be boolean to match the others, or maybe rcd for record, lst for list, ... etc

view this post on Zulip Luke Boswell (Jun 21 2023 at 05:56):

:shrug:

view this post on Zulip Brian Carroll (Jun 21 2023 at 07:33):

Oh wow. I know this is pure personal taste but I really don't like rcd and lst as names. That's taking it too far for me.

view this post on Zulip Richard Feldman (Jun 21 2023 at 11:17):

yeah I'd say Encode.str because that's what the type is named, but personally I wouldn't change anything else

view this post on Zulip Brendan Hansknecht (Jun 21 2023 at 13:18):

Yeah i was thinking each should match the type name.

view this post on Zulip Brendan Hansknecht (Jun 21 2023 at 13:19):

So bool, list,record, str


Last updated: Jun 16 2026 at 16:19 UTC