Coder Social home page Coder Social logo

Comments (5)

RossTate avatar RossTate commented on June 10, 2024 1

Cool. Will try to remember to follow up later. In the meanwhile, this probably is not an issue for the reference types proposal. The GC or Design proposals might be better fits.

from reference-types.

rossberg avatar rossberg commented on June 10, 2024

That would indeed be cool. I'm not aware of any prior discussion about it in the context of Wasm. However, as you guessed correctly, it would require a much more sophisticated type system, and such type systems are prone to be super-hard to combine with a variety of other features (cf. Rust and the decade-long quest to iron out the details of its semantics). It might also be difficult to target by compilers. Altogether very much a research problem -- which I'd be very curious to see somebody tackling.

from reference-types.

RossTate avatar RossTate commented on June 10, 2024

@lukewagner and I were chatting about something like this in the context of Interface Types. But rather than guarantee safety through static types (because, as @rossberg said, that requires fairly sophisticated types), we would guarantee it through dynamic means in a way that would interact well with memory management. Anyways, we were halfway through the conversation when I got distracted by deadlines outside of wasm, but maybe we'll have something to get your thoughts on later.

from reference-types.

lachlansneff avatar lachlansneff commented on June 10, 2024

@RossTate My initial thought was being able to convert an regular ref into an owning ref when there's just a single reference to the value, but I wasn't sure that's viable with a tracing garbage collector.

Agreeing with @rossberg here, a type system is a no go. But, that being said, I'd love to see discussion about dynamically enforcing this.

from reference-types.

rossberg avatar rossberg commented on June 10, 2024

I am closing this, since it is outside the scope of the current proposal. If there is enough interest, somebody should start a follow-up proposal.

from reference-types.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.