-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
love sql designer #329
Comments
Hi Ondras!
have an awesome day |
Not necessarily. You can always access global variables via the If I was to follow your suggestion to the point, I would not be able to use any local variables that share names with existing global variables, such as
Right. So in theory we are forbidden to use any variable name, because in the future, a standardized global API with the same name might exist? 😄 The point here is that our local variable will still work, even with a
But this is not the case, as we do not use the new Chrome API inside |
Hi Ondras! I tried this code to test out the idea, and sure enough, your ideas are 100% correct.
If we consider the main post of this github issue to raise awareness about this new possibly conflicting change,
Having said that, if time is available, after reading your thoughtful response, this came to my mind. Oh and by the way, it looks like you are a person who enjoys thinking, I love that! "Not necessarily. You can always access global variables via the window prefix." In the past, web developers have always chosen the shortcut, people rarely use window.alert() when alert() is present. suppose line 1 defines Consider the word document, people rarely use Consider the new developers, in a distant future, modifying and improving on any particular piece of code. unsuspectingly, the developer will stumble upon the fact of "error, undefined" which will still, in 2032 be a problem in browsers, (they don't evolve that fast), the newbie will be stumped, and unable to continue (unless he uses AI to solve it, but that is a whole other question here). so line 1 says
, as we know, not all browsers will have it, so most likely the developer will provide a soft failure. This is because the developer more likely to be lazy and avoid the window. prefix than the developer is likely to have every single variable name in every single local scope. So, I come to the conclusion, that if a piece of code is big and complex, and memory is limited, people may waste time, and as a result, I see all uses of Sure, your method isn't 200 lines today, but in the future, it may grow, in particular if it's AI itself writing these long methods, as is it's current incarnation, commonly long sections of code, not short ones. So, perhaps my worries are non-existant, but I still think the new Chrome will break many websites. "Such code may exist in the future, hypothetically, in many applications that receive text from users" What I meant by Here is a chart for AI integration interest in google, I don't think it proves anything, but it's another datapoint to consider.
So sure, right now, you understand perfectly the issue, but in the future, will people have your same understanding of the source code details?
I actually think you have just made an excellent point here!! and I also think you are correct, in that people may have introduced bugs in the source code like this (consider this hypothetical timeline):
it is reasonable to assume people changing line 1 and 2 did not read line 1000. therefore, even if "name" and "length" aren't very commonly used variables, I also think overwriting So, yes, this is in fact the exact same case, and I suspect instances of this bug exist right now as we speak (hopefully, in other people's code). Thank you for your thoughtful response and for your attention, please keep making wwwsqldesigner awesome! |
Right, software engineering is not an easy task. Fortunately, we have some useful tools and principles on our hand:
|
used it for many years!
so this "var ai=" thing may have a problem with upcoming changes on the browser, as it hides window.ai maybe it should be renamed.
wwwsqldesigner/js/row.js
Line 392 in a8be2f2
have an awesome day!
The text was updated successfully, but these errors were encountered: