[Haskell-beginners] (no subject)
Jamie F Olson
jamie.f.olson at gmail.com
Thu Mar 28 23:34:26 CET 2013
David McBride <toad3k <at> gmail.com> writes:
>
> data JSValue = ... | JSObject (JSObject JSValue) | ...
>
Thank you! I think the two strange things as an outsider particularly from more
OO languages are that types aren't objects, and then the strangeness of the
naming convention.
Would it have been legal to define data JSValue as something like this instead?
data JSValue
= JSValue
| JSValue !Bool
| JSValue !Rational
| JSValue JSString
| JSValue [JSValue]
| JSValue (JSObject JSValue)
More information about the Beginners
mailing list