Code Monkey home page Code Monkey logo

Comments (7)

neuecc avatar neuecc commented on July 23, 2024

completely no, set explicitly.

from memorypack.

xiaoyuvax avatar xiaoyuvax commented on July 23, 2024

I don't care the sequence of the type registered, and the numebrs r not gonna be reused, why can't the generator just fill it automatically?
omg, what if i have hundreds classes to register?

from memorypack.

neuecc avatar neuecc commented on July 23, 2024

If you have hundreds of them, you can just fill in the sequential numbers if they're auto-generated. If not, you can just fill them.
For Union tags, please CARE, for Version Tolerant.

from memorypack.

xiaoyuvax avatar xiaoyuvax commented on July 23, 2024

ok, i got it, seems Version Toloerance also requires carefully handle of these numbers, in another word, the orders, right?
but declare orders of the [MemoryPackUnion] already implies the orders for serialization, why not just use the declare order instead of the tags, even for Version Tolerance?

is

[MemoryPackUnion(0,Type1)]
[MemoryPackUnion(1,Type2)]
[MemoryPackUnion(2,Type3)]

equal to

[MemoryPackUnion(1,Type1)]
[MemoryPackUnion(3,Type2)]
[MemoryPackUnion(5,Type3)]

?

from memorypack.

neuecc avatar neuecc commented on July 23, 2024

What do you do when you delete type.
Basically, I prefer to be explicit, automatically member order is a special exception for me.

from memorypack.

xiaoyuvax avatar xiaoyuvax commented on July 23, 2024

The order is not automatically random, u can INFER the order from the [MemoryPackUnion] declaration?
and eliminate a parameter as to make coding easier.
Maxmize inference might reduce redundancy of information and coding, and maybe a good principle to take.

What's the differences below?

[MemoryPackUnion(Type1)]
[MemoryPackUnion(Type2)]   <- deleted
[MemoryPackUnion(Type3)]
[MemoryPackUnion(1,Type1)]
[MemoryPackUnion(3,Type3)]
[MemoryPackUnion(2,Type2)]  <-deleted

from memorypack.

xiaoyuvax avatar xiaoyuvax commented on July 23, 2024

or [MemoryPackUnion(IList<Type>)] is better?

from memorypack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.