gren-lang / book

The Gren Programming Language
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Opaque types #21

Open blaix opened 2 months ago

blaix commented 2 months ago

Cover the what, why, and how of opaque types. It would be nice to be able to point to this when talking about some of the upcoming changes to gren.

Maybe on the modules page, the types page, or a new page or section on common patterns.

blaix commented 2 months ago

I guess this is already kind of covered (without naming the concept) in https://gren-lang.org/book/syntax/modules/#exposing

but IMO unless you're already familiar with the concept, it probably doesn't make much sense on what it means or why you would or wouldn't expose a type's constructors.