Comments (19)
For the properties types, my Default
solution won't work, because there is not a single constructor for those types. So we should probably come up with a general solution that doesn't depend on Default
.
Here's another option
FooBorrowed::new() -> FooBorrowed<'static>
FooBorrowed::static_to_owned(self) -> Foo
Foo::try_new_unstable(...) -> Result<Foo>
Foo::as_borrowed(&self) -> FooBorrowed
from icu4x.
I have previously been unhappy that the properties constructors only let you get static borrowed types, and would prefer that we have cheap ways to get owned types compatible with ones loaded from data structs. It's kinda annoying to have this split in types.
But it also seems to work well. It's unclear where we should be drawing the line.
from icu4x.
Here's another question. In 2.0, should the types be named Foo
and FooBorrowed
, or should they be named FooOwned
(or FooData
) and Foo
?
from icu4x.
Related Issues (20)
- Decide on names for icu_datetime and icu_calendar errors over FFI HOT 1
- Should we adopt a more consistent naming convention for traits and marker types? HOT 28
- LocaleExpander and LocaleDirectionality should use `AsRef` for their type parameter
- GitHub Pages and GCS resource efficiency HOT 11
- Create a way to map a Locale to a default Currency HOT 6
- For Currency Long Formatting: check that the .json data is completed
- Refactor: Move `MeasureUnit` to a Separate Crate HOT 3
- Choose an appropriate name for `MeasureUnit` crate HOT 2
- Consider Adding Specific Formatter for Long Formatting in for currency formatter HOT 2
- Add return type to `Yoke::with_mut` and `Yokeable::transform_mut` HOT 6
- Suggestion: Use `PluralRules` instead of `Count` HOT 4
- Missing `other` Unit Pattern for `sd` Locale in the Data for Long Currency HOT 5
- Special ZeroMap for ULE keys and VarULE values HOT 7
- Better abstractions for splitting lengths out from VarZeroVec
- Improve handling of overlap patterns in semantic datetime
- We should support running ICU4X tests with JSON data HOT 6
- Add back postcard fingerprints.csv HOT 1
- Baked data is bigger than postcard data HOT 6
- Support for Date Ranges
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icu4x.