Something funky about UInt32 comparisons

The purpose of points is to help us determine which cases are having the most impact.

How can you say that it’s not impacting a lot of people ?
It’s impacting us, we worked around such issues. For us searching and trying to resolve such “bugs” by looking in Feedback and waiting for Xojo to fix it is impractical, this just takes too long. That’s probably why you don’t hear alot about these kind of “bugs”.

As @Thom_McGrath says other compilers don’t have such issues, so why doesn’t xojo seem to prioritize such problematic bugs?

I think you should try taking the forums a little more serious, if these kind of “serious” bugs that cause code to be handled unexpected i think you could as well make an internal case of it (if it’s not reported).

8 Likes

Honestly, if you want to see how problematic this issue is, turn on the warning. Assignments are one thing. I’d expect (and want) a warning if I’m trying to assign a UInt64 to an Int64. Comparisons shouldn’t trigger this behavior. The compiler should be able to compare a UInt64 to a Int64 without issue.

4 Likes

That’s actually worse, but no, you said:

Which is incorrect, which is what I was pointing out.

Its current zero ranking certainly doesn’t indicate as to how many people have been, are being or will be impacted by the problem which seems to be the point you were trying to make.

Just because a case doesn’t have a rank at the moment doesn’t mean that more people haven’t been impacted by it in the past and that points haven’t been assigned to it in the past, there could be a number of your users right now who have that case in their top cases but as they are out of their current 12 month honeymoon period their points aren’t shown. There could also be a number of paid up users who would like to add this to their current top cases but have more pressing issues that take precedent, this certainly doesn’t lighten the impact of the case from their perspective.

I’ll take a look at the feedback thread and chip in if I can muster the motivation.

9 Likes

Correct but it is relative to other cases. Sometimes it’s obvious that a case is or soon will impact a lot of users. Much of the time it’s less obvious or we would be making an educated guess about it. Rankings OTOH provide concrete evidence relative to other cases as to which ones are most important to users.

Relative to other cases in Feedback. As I said to Julian, rankings (and also subscribers as well) help us compare cases against others to determine relative impact. If a case is 5 years old but has only one user subscribed to it, that’s not going to likely get the same attention as a case that’s a month old and has 10 users subscribed to it with most of them ranking it as their #1 issue. So it’s the relative ranking that really matters.

Right, but as I mentioned in another thread, a data loss bug is something that would get Xojo’s attention regardless of rank. Something that affect’s Xojo’s ability to do math seems like it should be getting attention regardless of rank.

And to be honest, it shouldn’t be wether or not a bug is important to the users. That makes sense for features. But for bugs, the criteria really is wether or not it’s important to Xojo. Do you really feel that your compiler’s inability to correctly compare two numbers reflects positively on your product? At the end of the day, that’s what really matters.

Here’s the way I see this case. The storage mechanism for the number shouldn’t matter. If I want to ask the compiler if a UInt64 with a value of 18,446,744,073,709,551,615 is greater than an Int64 with a value of -9,223,372,036,854,775,808, I should have no problem doing that. Any human will figure that out in the blink of an eye. Other compilers can handle that kind of comparison. So should Xojo’s. The fact that it’ll claim these two numbers are equal is a bug, no question about it.

14 Likes

I understand that that’s how you feel about it. That’s not how we feel. We feel that the impact surface is what matters. If this bug was stopping you from being able to ship your software, that would be another matter but this one has an easy workaround and doesn’t appear to be impacting many people relative to other cases.

This bug is a duplicate of another bug that was closed as by design. It’s by design because to change the behavior would break existing code and there have been many times where we have had to make that choice. Sometimes you get stuck with a less than optimal solution simply because the optimal solution is too expensive in some way. In this case, the expense is breaking existing code.

As I understand it, 2218 was closed because an optimal solution was not considered. You are absolutely correct that there is no common type that can be used to correctly compare all of Xojo’s integer values. That’s why 11935 proposes a new type used behind the scenes that all integers could be promoted to when their types don’t exactly match. It should have no negative impact on old code while allowing these problems to go away.

2 Likes

Great logic, 1+1 = 3 but everyone put a check in for that a long time ago, so all the new users will need to implement that check.

We don’t care if we look like a toy language in the mean time, we have to protect that legacy code unless we need to rename something, then we won’t bother and we’ll Just Do It™

8 Likes

If it’s a new type, that’s a feature request, not a bug report. I suggest that you create a feature request that we add the type suggested.

Windows is not considered a toy operating system and yet it is filled with application shims designed to mimic behavior of bugs that specific popular application developers were assuming were by design behavior.

As a platform developer, we don’t always have the luxury having a narrow view of the situation. We have to consider the overall impact.

No. Please read 11935 closely. I’m not proposing a new user-accessible type such as Int128 or something like that. As I understand the proposal, the compiler would have a special type behind the scenes that could contain the full range of all integer types. Something only the compiler users. Users would never see it.

Basically, if Int64 and UInt64 use 64 bits, this special internal type would be something like Int65 so that the 64 bits of UInt64 could reside alongside the sign bit. You know I’m talking way outside my element here, but that’s my understanding of a potential solution to the problem.

1 Like

That argument holds true for bugs that are obvious to many users, for example UI bugs that show themselves easily. Bugs with mathematical operations may go undiscovered in a developer’s code for ages and are really hard to debug. Perhaps that’s why bugs like this one aren’t ranked by lots of people. Also, if a maths bug affects just one user it really needs promoting and fixing ASAP.

10 Likes

Yeah, I’m suddenly wary of what’s happening with any code that does mathematical operations. I guess I’ll have to do more checks as there may be some unexpected results.

2 Likes

It’s definitely a more common issue than you realize. I promise, turn on that warning and your eyes will be opened.

1 Like

Why are we deflecting onto operating systems? There are plenty of apps that break in the move between os’s both in windows and macos.

There are countless issues that you need to run older editions of VS for things that just weren’t brought over to newer editions or whole technologies that are sometimes deprecated or simply superseded and Microsoft often fix long standing issues in newer editions.

I assume you consider the impact of how people perceive the language due to the removal of Basic and Dim. I’m sure if you were a regular windows user, you’d have fixed the following by now:

<https://xojo.com/issue/43704>
<https://xojo.com/issue/43705>
<https://xojo.com/issue/43706>
<https://xojo.com/issue/46521>
<https://xojo.com/issue/46671>
<https://xojo.com/issue/46694>

9 Likes

You mean the “ignorance is blissed” method; you couldn’t have said it better. You can’t control what you don’t measure, but if your measuring system is flawed then who cares about the rest … just hold on for the ride.

4 Likes

Windows is not considered a toy operating system and yet it is filled with application shims designed to mimic behavior of bugs that specific popular application developers were assuming were by design behavior.

As a platform developer, we don’t always have the luxury having a narrow view of the situation. We have to consider the overall impact.

Logical_Fallacies_Anecdotal_Argument

1 Like

The purpose of points is to help us determine which cases are having the most impact.

Correct but it is relative to other cases. Sometimes it’s obvious that a case is or soon will impact a lot of users. Much of the time it’s less obvious or we would be making an educated guess about it. Rankings OTOH provide concrete evidence relative to other cases as to which ones are most important to users.

Relative to other cases in Feedback. As I said to Julian, rankings (and also subscribers as well) help us compare cases against others to determine relative impact. If a case is 5 years old but has only one user subscribed to it, that’s not going to likely get the same attention as a case that’s a month old and has 10 users subscribed to it with most of them ranking it as their #1 issue. So it’s the relative ranking that really matters.

Logical_Fallacies_Texas_Sharpshooter

> I think you should try taking the forums a little more serious

2 Likes