Discussion
Loading...

Discussion

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
zett
zett
@66@functional.cafe  ·  activity timestamp 4 weeks ago

@aartaka I want to know what you have to say on naming - for me a function should be named with a noun whenever possible -> then an adjective -> then a verb - but always understood as a noun, as if computation is already complete

"sum" not "add"

"product" not "multiply"

I would still write "permute" but in my mind I think of it as a noun

  • Copy link
  • Flag this post
  • Block
zett
zett
@66@functional.cafe  ·  activity timestamp 4 weeks ago

@aartaka I want to know what you have to say on naming - for me a function should be named with a noun whenever possible -> then an adjective -> then a verb - but always understood as a noun, as if computation is already complete

"sum" not "add"

"product" not "multiply"

I would still write "permute" but in my mind I think of it as a noun

  • Copy link
  • Flag this comment
  • Block
Artyom Bologov
Artyom Bologov
@aartaka@merveilles.town  ·  activity timestamp 4 weeks ago

@66 to me, there’s a separation of values and functions, like in #CommonLisp. Values (+ structures/classes) are nouns, while functions are verbs. So whoever uses my stuff does actions onto the world. And thus needs verbs.

I am relatively inconsistent in that though, naming some functions “fields” or "description", let alone the predicates and type conversion functions. But the aspiration is with the verbs.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.32 no JS en
Federation disabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct