Comments (5)
Agenda item: naming/terminology (and what of ☃)
from interface-types.
Another agenda item: idea for how to avoid slices/views altogether (at least until wasm adds a first-class sliceref
)
from interface-types.
from interface-types.
Reading the notes, it sounds like the semantics of passing/returning slices was discussed, but no conclusion was reached? Did I get that right?
@lukewagner Is sliceref
as a first-class type defined somewhere? Like, is there a public proposal, or is it an informal idea?
from interface-types.
In the call I basically just explained some recent thinking on whether we need slices/views. Namely:
- passing out a view to linear memory (as a typed array view or
sliceref
) is a pretty dangerous thing; it means that you now have to worry about the lifetime of that region of memory (with "use after free" bugs if the caller and callee don't agree) - but a lot of Web APIs take views, where the host both reads and writes from/to the view
- a sequence-of-bytes interface value could be optimized to do no more copying than a view when calling a host API (with the right adapter expressions)
And thus perhaps we can leave out slices, at least from the initial proposal so that we can focus on the safer, more composable value semantics.
I'm afraid there's no written-up proposal for sliceref
; it's just a very old idea that we assume we'll get around to at some point in time. The idea is basically to have a first-class typed array view that wasm can dynamically load and store from, ideally being able to point into both linear memory and ArrayBuffer
s (on the web).
from interface-types.
Related Issues (20)
- validateUtf8 typo in Explainer example HOT 1
- IT Mini-MVP? HOT 9
- Interface Types for self defined DataTypes HOT 1
- Define a "flags" interface type? HOT 6
- Interface type abbreviation for time? HOT 8
- Guaranteeing additional soundness properties HOT 11
- Unclear how adapting imports and acyclic instantiation works HOT 12
- Phase 2 estimate HOT 5
- Why is ByteString a string? HOT 3
- citability HOT 10
- NaN canonicalization HOT 39
- Why should strings be lists of Unicode Scalar Values? HOT 164
- Support UTF-16 as an additional encoding HOT 9
- Motivation for banning intertype recursion is not 100% clear HOT 12
- How possible is it to have two string types? HOT 14
- interface types versioning HOT 1
- Does flags enum type as be used typename or member name? HOT 1
- Where should `canonical_abi_*` be? HOT 4
- Backwards compatible additions to variants HOT 8
- Fixed-length lists HOT 2
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 interface-types.