Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated node.js API #23

Open
nadako opened this issue Oct 13, 2014 · 7 comments
Open

deprecated node.js API #23

nadako opened this issue Oct 13, 2014 · 7 comments

Comments

@nadako
Copy link
Member

nadako commented Oct 13, 2014

there are some deprecated API documented in current node.js docs. we could add @:deprecated metadata in haxe to warn user about that. think that's a nice free feature that plain node.js doesn't have.

thoughts?

@eduardo-costa
Copy link
Contributor

I'm ok!
Users will be delighted :)

@Simn
Copy link
Member

Simn commented Oct 13, 2014

No reason not to do that.

nadako added a commit that referenced this issue Oct 13, 2014
@nadako
Copy link
Member Author

nadako commented Oct 13, 2014

I added a guideline on using @:deprecated, but we need to review our current externs and add that it where apropriate.

@dionjwa
Copy link

dionjwa commented Nov 3, 2015

I have an issue with some of these. For example js.node.Util.isArray gives a deprecated warning, however I cannot find the non-deprecated way of calling the function that this deprecated call maps to (Array.isArray(...)).

I cannot find the 'NativeArray' equivalent Javascript class. So without a clear and obvious way to use the non-deprecated version in Haxe, I would rather not give compiler warnings for cases where the use cannot correct it.

@nadako
Copy link
Member Author

nadako commented Nov 3, 2015

Isn't standard Haxe way Std.is(obj, Array) sufficient?

@dionjwa
Copy link

dionjwa commented Nov 3, 2015

Perhaps. I made the assumption that Haxe arrays were not the same runtime object as JS arrays. So that assumption is wrong?

@nadako
Copy link
Member Author

nadako commented Nov 3, 2015

It's the same. However, we probably should provide Haxe-way examples in those deprecation messages indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants