Feedback
Add Integer.Zero, Double.Zero, and String.Empty shared properties
- Status
- Accepted
- Fixed in
- -
- Source discussion
- https://forum.objo.dev/d/1098-zero-property-is-not-consistent-for-scalar-numeric-types
- Last updated
- 2026-09-13
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Add read-only shared properties Integer.Zero, Double.Zero, and String.Empty for consistent, explicitly typed default values.
Currency, Decimal, and Duration already expose Zero, but Integer and Double do not. Code that builds an Array(Of Object) containing defaults for different types currently mixes named defaults with literals. These properties would make that code more consistent and make the intended numeric type explicit.
Expected values:
Integer.Zeroreturns the Integer value0.Double.Zeroreturns the Double value positive0.0.String.Emptyreturns the empty String"".
Existing literals and default initialisation remain supported and unchanged.