Hacker News new | past | comments | ask | show | jobs | submit login

In the current proposal,

    case (value) {
        when { constructor: Buffer } ->
            console.log("It's a Buffer!")
    }
that doesn't handle subtying though and doesn't work across realms.



Oh interesting you can match on that!

However I think my point stands that javascript has runtime conceptions of types that go beyond duck typing.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: