Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28020
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Make own type (object) type in javascript. |
| Date | 2015-06-07 10:19 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87sia3kh94.fsf@bsb.me.uk> (permalink) |
| References | <66362d49-af1e-400b-b026-0e6d9b679f98@googlegroups.com> <87iob0l79e.fsf@bsb.me.uk> <Byte-20150607021237@ram.dialup.fu-berlin.de> <877frgl5lz.fsf@bsb.me.uk> <fc57b9d2-b804-4679-9a16-6457fb0f4970@googlegroups.com> |
jonas.thornvall@gmail.com writes: > Den söndag 7 juni 2015 kl. 02:33:32 UTC+2 skrev Ben Bacarisse: >> ram@zedat.fu-berlin.de (Stefan Ram) writes: >> >> > Ben Bacarisse <ben.usenet@bsb.me.uk> writes: >> >>jonas.thornvall@gmail.com writes: >> >>>Is it possible to create an object holding holding 1 bit, 2 bit, 3 bit >> >>>that still can be treated as a numerical value that can be added and >> >>>subtracted, without bit operations? >> >>No. >> > >> > An attempt at implementing an object »holding« 8 bit: >> >> It seems unlikely that he meant can one store small whole numbers in >> 64-bit floating point variables. He's been doing that for months >> (years?). >> >> <snip> >> -- >> Ben. > > But what is this Ben? > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures Can you rely on Edition 6? I may have misunderstood your goal which I took to be a request for minimal sized objects. If you don't mind wasting bits, there are lots of ways to do what you ask (see other replies prompted by my "no" reply for some examples). But these new types only give you another kind of container into which to pack the data -- they don't allow you to do anything you could not do otherwise. <snip> -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-06 15:11 -0700
Re: Make own type (object) type in javascript. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-07 00:57 +0100
Re: Make own type (object) type in javascript. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-07 01:33 +0100
Re: Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-06 17:37 -0700
Re: Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-06 17:50 -0700
Re: Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-06 18:03 -0700
Re: Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-06 18:07 -0700
Re: Make own type (object) type in javascript. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-07 10:19 +0100
Re: Make own type (object) type in javascript. jonas.thornvall@gmail.com - 2015-06-07 04:09 -0700
Re: Make own type (object) type in javascript. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 02:40 +0200
csiph-web