Giter VIP home page Giter VIP logo

nobox's People

Contributors

pankraty avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

nobox's Issues

Implement shorten types

decimal, DateTimeOffset, and Guid are the only three of the supported simple types that occupy 16 bytes. All the others are 8 bytes at max.

At the same time, there are a plenty cases when the support of that types is not needed (the simplest example - in Excel cells decimal would become double and Guid would be formatted to string). Therefore, we can save 8 bytes per instance (and increase performance a little) by providing shorted types (e.g. ShortSimpleValue and ShortSimpleValueOr<T>).

They must be convertible to and from SimpleValue and SimpleValueOr<T>.

Find a generalized approach to avoid lots of copy-pasting

With only two types (SimpleValue and SimpleValueOr<T>) there are already lots of copy-pasted code, especially, in tests. Structures cannot be inherited, and we are not able to cast value types to generic type-arguments, so easy ways to avoid code duplication do not fit.

Need to investigate is it possible to use dynamics (in tests, not in code) or T4 templates.

Add support for enum types

May add another value type SimpleValueType.Enum that will be stored in either _longValue or _ulongValue field, depending on the underlying type. The information about the original type will be lost but at least the value will be preserved.

Write documentation

  • Examples of use cases which can benefit from using this library
  • Installation guide
  • Usage of SimpleValue and SimpleValueOr<T>
  • Supported types
  • Rules for casting types

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.