comp.lang.ada
 help / color / mirror / Atom feed
From: fraser@synopsys.synopsys.com.com
Subject: Re: how to do bit-wise operation on none modular types?
Date: 1999/03/03
Date: 1999-03-03T00:00:00+00:00	[thread overview]
Message-ID: <7bk5u2$94p$1@remarQ.com> (raw)
In-Reply-To: 7bjjck$25t7@news1.newsguy.com

I nearly cried when smize@imagin.net said:

>Do you get some advantage from the "more direct route" that compensates
>for it being somewhat less clear?  I would expect the type conversion
>to be a "view conversion" (terminology check) and so not to require
>a copy, so both code fragments would be equally efficient.

Do you find 'X mod 16#1_0000#' less clear than 'X and 16#FFFF#' (or even
'My_Mod (X) and 16#FFFF#'?  I'm quite the reverse.  I'm glad that the
bitwise operations on modular types are part of the language now, but
they still seem, um, low level.

I've recently written a couple of virtual machines for two wildly different
purposes, and there was a lot of bit fiddling going on, but I did it almost
exclusively with "/" and "mod", even though I was looking at modular types.
I suddenly wonder if I was wrong.  Oh, my.

Fraser.
(avoiding low level operations on a virtual machine code emulator -- maybe
I _am_ fooling myself :)




  parent reply	other threads:[~1999-03-03  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 how to do bit-wise operation on none modular types? bill
1999-03-03  0:00 ` Tarjei Tj�stheim Jensen
1999-03-03  0:00 ` Tucker Taft
1999-03-03  0:00   ` Samuel Mize
1999-03-03  0:00     ` dennison
1999-03-03  0:00     ` fraser [this message]
1999-03-04  0:00       ` Samuel Mize
1999-03-05  0:00         ` fraser
1999-03-04  0:00       ` dennison
1999-03-03  0:00     ` Tucker Taft
1999-03-04  0:00       ` Tom Moran
1999-03-04  0:00         ` fraser
1999-03-04  0:00       ` robert_dewar
1999-03-05  0:00         ` bourguet
1999-03-05  0:00           ` robert_dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox