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

Type.typeof(Int64.make(0, 0)) yields different results between different platforms #3096

Open
Atry opened this issue Jun 4, 2014 · 21 comments
Assignees
Milestone

Comments

@Atry
Copy link
Contributor

Atry commented Jun 4, 2014

  • TInt or TDouble for Java targets
  • TClass(haxe.Int64) for Flash targets
  • TClass(haxe.Int64) for Neko targets
@Atry Atry changed the title Different results between different platforms' Type.typeof(Int64.make(0, 0)) Type.typeof(Int64.make(0, 0)) yields different results between different platforms Jun 4, 2014
@Simn
Copy link
Member

Simn commented Jun 4, 2014

That's by design. Some targets can use their native Int64 implementations while others have to emulate it.

@Simn Simn closed this as completed Jun 4, 2014
@Atry
Copy link
Contributor Author

Atry commented Jun 4, 2014

Whatever the design is, returning TInt or TDouble for a Int64 makes no sense.

@waneck
Copy link
Member

waneck commented Jun 4, 2014

I agree. I can change that for Java/C#

@waneck waneck reopened this Jun 4, 2014
@Simn
Copy link
Member

Simn commented Jun 4, 2014

You may want to wait till the Int64 pull request is merged.

@waneck
Copy link
Member

waneck commented Jun 4, 2014

Okay. Makes sense.

@Simn Simn added this to the 3.2 milestone Feb 21, 2015
@Simn
Copy link
Member

Simn commented Feb 21, 2015

This can (and should) be addressed now.

@ncannasse
Copy link
Member

Reflection on abstracts is problematic.

We could add a new TInt64 result, but are we sure we can correctly deduce it on all platforms ? (no false positive, and no missed value) + this will require additional things in (Un)Serializer

@Simn
Copy link
Member

Simn commented Feb 21, 2015

I think the main point here is that Int64 can't be distinguished from Int and Float on these targets.

@waneck
Copy link
Member

waneck commented Feb 27, 2015

Should we add a new TInt64 result?

@ncannasse
Copy link
Member

@waneck I think that's a bit early for that, same for supporting Int64 in serializer. Let's way a bit more until it becomes a first class citizen.

@ncannasse ncannasse modified the milestones: 3.3, 3.2 Feb 27, 2015
@Simn
Copy link
Member

Simn commented Feb 27, 2015

The problem right now is that people who used Std.is(v, Int64) do not have an alternative.

@ncannasse
Copy link
Member

@Simn we could add a Int64.is for the time being

@ncannasse
Copy link
Member

(which would be not exclusive, which means an Int could be Int64 if that's the way it's implemented on the platform)

@Simn
Copy link
Member

Simn commented Feb 28, 2015

What about serialization btw?

@ncannasse
Copy link
Member

Same, I think we should wait for 3.3 to fully support Int64 in terms of reflection/serialization, if it needs to be (which i'm not yet sure)

@jonasmalacofilho
Copy link
Member

First, I think the behavior in Java should be considered a bug, since Type.typeof will return TFloat for values that can't be represented at all with a double. Even if no more Int64 changes are pushed to other targets, fixing this in 3.2 would be awesome.

Second, a non exclusive Int64.is if fine. Or, how about adding TInt64 to ValueType, as proposed on IRC by Simn?

Finally, the point of the recent changes hasn't been to improve the usage Int64? This suggests that it should be a first class citizen in Haxe, thus supported for reflection/serialization as soon as possible.

@Simn
Copy link
Member

Simn commented Mar 2, 2015

I can't see us addressing this in any clean way without adding TInt64.

@Simn Simn modified the milestones: 3.3.0-rc1, 3.4 Feb 23, 2016
@Simn Simn modified the milestones: 3.4, 4.0 Jan 9, 2017
@Simn Simn modified the milestones: 4.0, 3.4 Jan 9, 2017
@waneck
Copy link
Member

waneck commented Jun 25, 2017

Should we add a TInt64 type?

@Simn
Copy link
Member

Simn commented Jun 25, 2017

I think so.

@waneck
Copy link
Member

waneck commented Jun 25, 2017

I agree. I can do Java/C#'s part, but we'll need it to be implemented on the other targets as well

@Simn
Copy link
Member

Simn commented Jun 25, 2017

Start a branch then!

@Simn Simn modified the milestones: Release 4.0, Backlog Apr 17, 2018
@Simn Simn modified the milestones: Backlog, Later Mar 24, 2023
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

5 participants