Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning: Primitive/built-in Types #12

Open
LB-- opened this issue Nov 28, 2014 · 5 comments
Open

Planning: Primitive/built-in Types #12

LB-- opened this issue Nov 28, 2014 · 5 comments
Assignees
Labels

Comments

@LB--
Copy link
Member

LB-- commented Nov 28, 2014

  • void - special type with 0 size (may be instantiated, but optimized out)
  • boolean/bool - boolean type
  • int@8, int@16, int@32, int@64, etc - signed integral types
  • uint@8, uint@16, uint@32, uint@64, etc - unsigned integral types
  • float@32, float@64, etc - signed floating point types
  • character - special non-numeric type for holding a character from the unicode character set
@LB-- LB-- added the planning label Nov 28, 2014
@LB-- LB-- self-assigned this Nov 28, 2014
@LB--
Copy link
Member Author

LB-- commented Mar 23, 2015

Some expressions have special types that are context-sensitive and are handles by the compiler.

  • null - take a guess. Very similar if not the same as C++'s nullptr
  • Numeric constants typically implicitly convert to whatever numeric type is needed of the, however each constant has its own unique type that can be used for ADL/disambiguation.

@LB--
Copy link
Member Author

LB-- commented Oct 11, 2015

@LB--
Copy link
Member Author

LB-- commented Oct 31, 2015

With characters: there should probably be two types: fast and small. Fast characters will take up a fixed width and be able to hold any unicode code point, at the expense of wasting memory. Small characters will only use the needed memory, but obviously this has performance penalties.

EDIT: see instead #36

@LB--
Copy link
Member Author

LB-- commented May 11, 2016

each constant has its own unique type that can be used for ADL/disambiguation.

Not sure what I was thinking here. Probably a bad idea.

@LB--
Copy link
Member Author

LB-- commented Jul 13, 2016

Bitwise operations are not allowed on signed types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant