While learning Daml, I relied heavily on the Fast Track to Daml Cheat Sheet. In the Data section, there are examples for both “Record” and “Product” types.
Record data MyRecord = MyRecord { label1 : Int, label2 : Text}
Product type data IntAndText = IntAndText with myInt : Int, myText : Text
However, as I now read An Introduction to Daml / Data Types, I find this example of a “Record”:
data MyRecord = MyRecord with
my_txt : Text
my_int : Int
my_dec : Decimal
my_list : [Text]
I get the sneaking suspicion that the two ideas (record types and product types) are the same thing. And that the { }
syntax and the with
syntax are two alternative syntaxes.
Is there any difference between these two things?