Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39932
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: I don't get it |
| Date | 2021-04-14 10:06 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87im4pkzg8.fsf@bsb.me.uk> (permalink) |
| References | (16 earlier) <8090782c-7564-4881-a97e-70dd1e865674n@googlegroups.com> <87y2dmmgln.fsf@bsb.me.uk> <s550nh$f6a$1@dont-email.me> <875z0pn1sr.fsf@bsb.me.uk> <s567um$vhj$1@dont-email.me> |
The Natural Philosopher <tnp@invalid.invalid> writes: > On 14/04/2021 01:32, Ben Bacarisse wrote: >> The Natural Philosopher <tnp@invalid.invalid> writes: >> >>> On 13/04/2021 14:58, Ben Bacarisse wrote: >>>> The function is doing exactly what you wrote. >>> >>> Not for at least two decades, and certainly not in JavaScript. >>> >>> The function is doing what the compiler and/or interpreter decided you >>> *meant* by what you wrote. >> >> It's a common mistake to think of code as implying more than it does. >> This is particularly true of high-level languages like ECMAScript, but >> it's also true of languages like C. Assuming more than the language >> guarantees has been the source of many bugs in C programs. >> >>> Which is why you now have new keywords like 'volatile' to try and >>> force it not to be clever with loop optimisations and Number() to >>> ensure it actually does cast an unknown variable type to a number... >> >> Hmm... Your recent Number() example seems to be simply a case of your >> not knowing what the language guarantees. > > Indeed. In the end that was exactly what it was, which proves that > particular point. The spec didn't cover the case. You are mistaken. Did you check the sections I cited? You seem to have a fixation with spreading FUD about the specification. > And yet it should have. I had no reason to suppose that having got it > working in Firefox it would utterly fail to work in IE4... I hope that 4 is a typo. The code you originally posted works as per the spec in IE6 (contrary to your previous claims). If is was broken in one, it had to be in Mozilla. Whilst I doubt that, I can't easily test old versions of it. You appear to be immune to these facts. The code you most recently posted shows nothing since if you want to compare two string numerically it makes sense to convert both explicitly to numbers. There's no relation to the previous point about implicit conversions as far as I can see since, given that you were unaware of what the language requires, you would not have converted only one. Anyway, you don't post the code that you say caused problems, only the "corrected" code which is exactly as I would expect it to look. -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-08 03:32 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-08 03:37 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-08 04:26 -0700
Re: I don't get it JJ <jj4public@gmail.com> - 2021-04-08 19:39 +0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-08 05:53 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-08 13:55 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-09 00:46 -0700
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-09 10:03 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-09 04:09 -0700
Re: I don't get it "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-09 11:07 -0700
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-10 03:23 +0100
Re: I don't get it "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-10 22:02 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-11 01:05 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-11 01:07 -0700
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-11 11:42 +0100
Re: I don't get it John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-09 20:01 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-09 13:31 -0700
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-10 03:37 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-09 23:53 -0700
Re: I don't get it John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-10 12:05 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-10 15:59 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-10 15:47 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-10 18:25 +0100
Re: I don't get it Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-04-10 17:29 +0000
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-10 19:08 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-11 11:41 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-11 14:33 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-12 02:39 -0700
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-12 11:21 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-12 10:19 -0700
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-12 21:20 +0100
Re: I don't get it "sc...@sauyet.com" <scott@sauyet.com> - 2021-04-12 14:32 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-13 04:11 -0700
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-13 14:58 +0100
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-13 09:20 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-13 09:29 -0700
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-13 20:06 +0100
Re: I don't get it "sc...@sauyet.com" <scott@sauyet.com> - 2021-04-13 15:09 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-14 01:15 -0700
Re: I don't get it "sc...@sauyet.com" <scott@sauyet.com> - 2021-04-14 05:22 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-15 11:52 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-15 11:57 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-15 12:04 -0700
Re: I don't get it Scott Sauyet <scott.sauyet@gmail.com> - 2021-04-15 19:29 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-20 14:12 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-20 14:47 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-20 23:35 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-21 01:08 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-21 01:24 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-21 01:29 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-13 09:32 -0700
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-13 21:59 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-14 01:32 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-14 09:08 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-14 10:06 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-14 10:59 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-14 14:05 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-14 16:32 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-14 23:53 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-15 13:56 +0100
Re: I don't get it The Natural Philosopher <tnp@invalid.invalid> - 2021-04-12 11:20 +0100
Re: I don't get it Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-08 15:21 +0100
Re: I don't get it Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-09 16:50 +0200
Re: I don't get it Man From a city with name Viljandi <he12457@hotmail.com> - 2021-04-08 10:44 -0700
Re: I don't get it Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-10 00:01 -0700
csiph-web