Comments (6)
My initial reaction is that I think this is a beneficial change. Returning things from closures is a pain, especially closures with restrictive lifetime parameters like the ones here. Does R
need to be 'static
?
CC @Manishearth
from icu4x.
My immediate reaction is worry about contravariance and implied bounds sneaking in a 'b
anyway: see rust-lang/rust#106431 for the last time this kind of thing happened. It gets pretty subtle and is hard to reason about.
I am overall in favor of this if we can be really sure that it works the way we expect it to.
from icu4x.
R: 'static
would indeed be a way to make this work without any chance of problems. Would be nice to allow self-borrows, but R: 'a
is almost certainly going to get the implied bounds messiness.
from icu4x.
I think R: 'static
solves a lot of use cases; it allows the closure to return primitives and owned data, which it can't currently do since the closure is required to be 'static
, so it can't save output variables to its context.
from icu4x.
I'm in favor of R: 'static
+ a breaking change
from icu4x.
Hmm, that variance issue is quite tricky. My gut says it wouldn't be a problem here since F
is covariant over R
, but I don't really know how to verify the soundness.
from icu4x.
Related Issues (20)
- 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
- Should compiled data constructors be on the owned or borrowed type? HOT 19
- Support for Date Ranges
- transliterator: Transliterator should support UTF-16 HOT 1
- Time zone variant calculator: does it let us fully handle zoned datetime formatting? HOT 32
- CLDR 46 tracking issue
- Currency formatter needs to handle CLDR pattern and symbol overrides
- FixedDecimalFormatterOptions should accept None as grouping strategy
- Reaffirm TryWriteable design HOT 8
- UTC vs GMT HOT 2
- Should feature icu_provider/export be named icu_provider/datagen HOT 1
- Make VarZeroVec branchless like ZeroVec
- Introduce borrowed versions of segmenter types
- Remove the initial 0 length from VarZeroVec's representation HOT 1
- Efficient full normalization HOT 2
- Holistic zerovec abstraction design HOT 5
- Make baked data constructor on owner normalizer types return the borrowed type
- `TimeZoneInput` is too unstructured HOT 15
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.