Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Date arithmetic Date: Wed, 19 Nov 2014 22:40:02 +0000 Organization: A noiseless patient Spider Lines: 33 Message-ID: <87ppci3jct.fsf@bsb.me.uk> References: <111120142237479787%timstreater@greenbee.net> <6814026.8sujcrue1K@PointedEars.de> <5592bc20-5fa3-4b2d-8534-1c81d62c31a5@googlegroups.com> <5371045.XxPr97Xf0d@PointedEars.de> <877fyr3sxr.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="28487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gIvrsYZ/23uVrZ5REZCDeLIEN8o0dxLI=" Cancel-Lock: sha1:6XK7mjakbxKeFnl9Qw6xXHDwDQo= sha1:gFlYDat+LyawG75DJ+dbkw4QL3E= X-BSB-Auth: 1.421d48da86ebf50c9946.20141119224002GMT.87ppci3jct.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:26172 "Evertjan." writes: > Ben Bacarisse wrote on 19 nov 2014 in > comp.lang.javascript: > >>>> Since it is the only number type available for variables, >>> >>> What about integers? >> >> ECMAScript does not have a separate integer type. You can represent any >> integer in (2^53, 2^53) exactly (and zero twice!) using the built-in >> Number type, but you are still using a floating point type as far as the >> language definition goes. > > So what? Some people don't know that ECMAScript has only one Number type, and your remark might have misled other into thinking otherwise, so I think more explanation is helpful. That's all. > I can define integer and put that into a javascript variable, > you only define "integer type" differently from mine. Sure, but personal definitions of terms that have a technical meaning in a particular language are often more confusing than helpful. If you like to think of Number variables that contain the floating point representation of a whole number as having "integer type" that's fine, but it's almost certainly going to be pointed out that you are not using the standard meaning. -- Ben.