Giter Club home page Giter Club logo

Comments (4)

karl-police avatar karl-police commented on July 24, 2024 1

This was fixed too

from luau.

karl-police avatar karl-police commented on July 24, 2024

also x shows up as never, I think this should become a setting, if unknown and never are a reference to any it's sooo confusing, someone explain

from luau.

aatxe avatar aatxe commented on July 24, 2024

unknown and never are different types, not references to any. unknown and any are very closely related though. unknown is a type that can be ascribed to any value, and any is a type that ignores any type errors it might run into. So, in practice, they look very similar, but the difference is that if you want to take something from the type unknown to a more specific type, you'll have to explicitly cast it, but any will allow you to implicitly cast to a more specific type. never, on the other hand, is the return type of functions that do not return (e.g. the built-in error function). We'll provide more documentation for all of this when we actually ship the new type solver.

from luau.

karl-police avatar karl-police commented on July 24, 2024

unknown and never are different types, not references to any. unknown and any are very closely related though. unknown is a type that can be ascribed to any value, and any is a type that ignores any type errors it might run into. So, in practice, they look very similar, but the difference is that if you want to take something from the type unknown to a more specific type, you'll have to explicitly cast it, but any will allow you to implicitly cast to a more specific type. never, on the other hand, is the return type of functions that do not return (e.g. the built-in error function). We'll provide more documentation for all of this when we actually ship the new type solver.

I saw that the new type solver typeof(table.clone()) outputs {+ +} now, instead of {- -}

Not sure if that's intended. It is gonna break anyone that used table.clone() for {- -} (barely anyone does that probably, other than me)

A cool thing though is that typeof({}) is now an unsealed table.

 

100% there's a valid usecase for doing this. e.g. creating a class where you pass a table

you access that table through class.Data however, something magical makes it sealed and this typeof method is what I use as a solution

I can even see adding support for customized properties in Roact... maybe, somehow in some way. Roact is not used anymore though.

from luau.

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.