79833708

Date: 2025-11-30 06:01:49
Score: 2
Natty:
Report link

Thank you all for your responses

@Richard - At the moment no, they only probably need a human readable name for the moment. If I need to add more information later like a sales prices or such I was thinking of creating a generic SalesItem where the specific is composited into that new item. - Or what ever the common practice equivalent for this would be in F#.

@Brian - thank you - I will try and give that approach a go today if I get time. It looks promising, visually. I'll be interested to see how my "operations" functions work with it. It looks close to what I want to achieve in my mind.

@Brent - The plan is to only allow new materials and behaviours for them through new hardcoded types. I understand with F# pattern matching I could probably have a single type with a differentiator say "Ore", "Oil" "Gas" and then have a Name "Iron Ore", "Coal Ore", "Crude Oil", "Natural Gas" but then I would assume I will have some massively long "match" expressions that will have to grow with each new type, anyway? Or am I looking at this wrong.

Sorry for answering to all in a single reply, but normally in Stack Overflow I would comment on each reply, but for some reason SO is not giving me that option today!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): thank you
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Richard
  • User mentioned (0): @Brian
  • User mentioned (0): @Brent
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Dib