- Timestamp:
- 07/06/06 21:39:38 (2 years ago)
- Files:
-
- 1 modified
-
lib/Pugs/Doc/Hack/Style.pod (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lib/Pugs/Doc/Hack/Style.pod
r11246 r11247 20 20 data Val = Int Int | String String | ... 21 21 22 Then readers of code that uses these types may get confused about when 23 you are using Val, Int, and String as concrete types and when you are 24 constructing a value. 22 Then readers your code may get confused about when you are using Val, 23 Int, and String as concrete types and when you are constructing a value. 25 24 26 25 The following convention is proposed. It can help against this problem, … … 56 55 in constructor and in field names: 57 56 57 -- Aliases always refer to toplevel name, so not "StorageVal" here 58 58 type EntryStorage = TVar Val 59 59 … … 63 63 } 64 64 65 Multiple variant records candrop the C<Mk> prefix and start with the65 Multiple variant records drop the C<Mk> prefix and start with the 66 66 given name: 67 67 68 type ObjClass = Class69 68 type MutClass = Class 69 type ObjClass = Class -- Again, refer to toplevel directly 70 70 71 type ObjId = Native 71 72 type ObjSlots = TVar (Map Ident Val)
