Improve Clarity in the Naming and Purpose of `Data`, `Case`, and `Schema.data`
I would like to address some concerns regarding the naming of Data and Case:
-
It seems that
Datais associated with enabling comparability throughEqual. However, the name itself does not effectively convey its intended purpose, possibly leading to confusion. -
The term
Caseis used to describe a datatype that shares similarities with a case class in Scala. This reference could be puzzling and unclear to many, potentially causing confusion among developers. -
(consequently, the purpose of
Schema.datalacks clarity and does not effectively communicate its meaning.)
Proposed Actions:
- Discuss and clarify the purpose and naming of
Data,Caseto ensure they are intuitive and meaningful. - Explore alternative names or concepts that provide better clarity and understanding.
/cc @schickling
I don't even use either cause it's not clear to me what they're for. And no documentation on them
-
Data stands for Data Type, those are known with different names depending on the language (Data Objects, Value Objects, Case Objects, Immutable Objects)
-
Case is a leftover, it should represent a "Case" so something that should be used in a union but we are using Tagged to convey that meaning so references to Case are to be removed
I am open to different names for 1 but none of the other known names (Value, Case) is as good in my view, the objective of those types is for them to be immutable objects that compare by value
@joshamaju the Data module is documented here https://www.effect.website/docs/data-types/data
@gcanti Great, thanks