Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

How would you do ADT Serialization? #63

Closed
fatuhoku opened this issue Mar 12, 2014 · 3 comments
Closed

How would you do ADT Serialization? #63

fatuhoku opened this issue Mar 12, 2014 · 3 comments

Comments

@fatuhoku
Copy link

This could be more of a question than an issue. It'd be nice to have an official voice on this.

ADTs are super useful. However, do they enjoy the same level of serialisation support as normal Obj-C objects? (How) could ADTs be automatically serialized and deserialized to and from a blob?

e.g. will ADT objects work with JSONKit

I'm looking for something analogous to the Binary typeclass in Haskell (see here).

Thanks!

@jspahrsummers
Copy link
Owner

ADTs aren't actually objects—they're basically just C structs. You may be more interested in the Mantle library (of which I'm an author).

@fatuhoku
Copy link
Author

Ah. Excellent reply. I probably couldn't have found that myself. Thanks @jspahrsummers for your open source projects!

@jspahrsummers
Copy link
Owner

You're quite welcome! 🌠

diederich added a commit to cocologics/libextobjc that referenced this issue Jun 28, 2017
Submodule changes to be committed:

* Configuration c8e5527...4ac967d (12):
  > Merge pull request jspahrsummers#80 from cocologics/feature/xcode9-update
  > Merge pull request jspahrsummers#79 from cocologics/feature/xcode9-update
  > Merge pull request jspahrsummers#71 from fabb/analyzer_localized
  > enable CLANG_ANALYZER_NONNULL
  > enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION
  > enables SWIFT_TREAT_WARNINGS_AS_ERRORS
  > Merge pull request jspahrsummers#67 from fabb/enable_nullability_completeness_warning
  > Merge pull request jspahrsummers#65 from Abizern/xcode8_debug_flag
  > Merge pull request jspahrsummers#64 from diederich/enableTestability
  > Merge pull request jspahrsummers#63 from diederich/implicitCaptureOfSelf
  > Merge pull request jspahrsummers#62 from calebd/xcode-8-beta-5-warnings
  > Merge pull request jspahrsummers#61 from ikesyo/disable-framework-codesigning
diederich added a commit that referenced this issue Jul 14, 2017
* bumped the xcconfigs to latest version
* fix build on Xcode 9 ('void' missing in strict declaration checking)

Submodule changes to be committed:

* Configuration c8e5527...4ac967d (12):
  > Merge pull request #80 from cocologics/feature/xcode9-update
  > Merge pull request #79 from cocologics/feature/xcode9-update
  > Merge pull request #71 from fabb/analyzer_localized
  > enable CLANG_ANALYZER_NONNULL
  > enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION
  > enables SWIFT_TREAT_WARNINGS_AS_ERRORS
  > Merge pull request #67 from fabb/enable_nullability_completeness_warning
  > Merge pull request #65 from Abizern/xcode8_debug_flag
  > Merge pull request #64 from diederich/enableTestability
  > Merge pull request #63 from diederich/implicitCaptureOfSelf
  > Merge pull request #62 from calebd/xcode-8-beta-5-warnings
  > Merge pull request #61 from ikesyo/disable-framework-codesigning
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants