Click here to Skip to main content
15,891,136 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
newton.saber18-Aug-15 11:25
newton.saber18-Aug-15 11:25 
GeneralRe: Sharp regrets: Top 10 worst C# features PinPopular
Pete O'Hanlon18-Aug-15 11:40
mvePete O'Hanlon18-Aug-15 11:40 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
newton.saber19-Aug-15 1:29
newton.saber19-Aug-15 1:29 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
PIEBALDconsult19-Aug-15 7:06
mvePIEBALDconsult19-Aug-15 7:06 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
newton.saber19-Aug-15 7:35
newton.saber19-Aug-15 7:35 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
PIEBALDconsult19-Aug-15 7:40
mvePIEBALDconsult19-Aug-15 7:40 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
phil.o18-Aug-15 11:55
professionalphil.o18-Aug-15 11:55 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
harold aptroot18-Aug-15 12:42
harold aptroot18-Aug-15 12:42 
phil.o wrote:
I also agree on the fact that two concepts that do not overlap should not be implemented in a single object (ex: integers/bit arrays, enums/flagged enums). Having a consistent system for bit-arrays handling would be a great improvement.
I see this a lot, but they do overlap. A lot of the power of using an int as a bitarray comes from the ability to use operations that aren't strictly bitwise, for example x & -x selects the lowest set bit (if there is one) without having to look for it,
x & x - 1 removes the lowest set bit (used also as part of determining whether a number is a power of two), or to take a more practical turn, the o^(o-2r) trick in chess engines.

Meanwhile integers that we pretend aren't bitarrays (they still are) benefit from bitwise operations, for example testing whether it's a power of two (as above), rounding up/down until it is a power of two (involves a bunch of shift/or), rounding down to a known power of two (eg x & -16 is the canonical way to round x down to a multiple of 16), and even knocking off the lowest set bit (as above) in the indexing of a Fenwick tree (it's not a bag of bits there, it's an index), the FFT bitreversal (again an index, not a bag of bits).

Arithmetic operations and bitwise operations are not two different worlds, they mix in useful ways.
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
PIEBALDconsult19-Aug-15 7:17
mvePIEBALDconsult19-Aug-15 7:17 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
Pete O'Hanlon19-Aug-15 2:19
mvePete O'Hanlon19-Aug-15 2:19 
JokeRe: Sharp regrets: Top 10 worst C# features Pin
Matt T Heffron19-Aug-15 6:11
professionalMatt T Heffron19-Aug-15 6:11 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
PIEBALDconsult19-Aug-15 9:04
mvePIEBALDconsult19-Aug-15 9:04 
GeneralRe: Sharp regrets: Top 10 worst C# features Pin
Pete O'Hanlon19-Aug-15 22:22
mvePete O'Hanlon19-Aug-15 22:22 
News7 bad habits of highly ineffective software engineers Pin
Kent Sharkey18-Aug-15 9:51
staffKent Sharkey18-Aug-15 9:51 
GeneralRe: 7 bad habits of highly ineffective software engineers Pin
R. Giskard Reventlov18-Aug-15 10:42
R. Giskard Reventlov18-Aug-15 10:42 
GeneralRe: 7 bad habits of highly ineffective software engineers Pin
Eddy Vluggen19-Aug-15 1:25
professionalEddy Vluggen19-Aug-15 1:25 
NewsVersion control, Git, and your enterprise Pin
Kent Sharkey18-Aug-15 8:11
staffKent Sharkey18-Aug-15 8:11 
NewsHow much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Kent Sharkey18-Aug-15 8:08
staffKent Sharkey18-Aug-15 8:08 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Afzaal Ahmad Zeeshan18-Aug-15 8:52
professionalAfzaal Ahmad Zeeshan18-Aug-15 8:52 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Ravi Bhavnani18-Aug-15 9:25
professionalRavi Bhavnani18-Aug-15 9:25 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Afzaal Ahmad Zeeshan18-Aug-15 10:02
professionalAfzaal Ahmad Zeeshan18-Aug-15 10:02 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Ravi Bhavnani18-Aug-15 10:30
professionalRavi Bhavnani18-Aug-15 10:30 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Afzaal Ahmad Zeeshan18-Aug-15 10:36
professionalAfzaal Ahmad Zeeshan18-Aug-15 10:36 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
Ravi Bhavnani18-Aug-15 10:55
professionalRavi Bhavnani18-Aug-15 10:55 
GeneralRe: How much RAM? 4GB vs. 8GB vs. 16GB performance Pin
PIEBALDconsult18-Aug-15 9:45
mvePIEBALDconsult18-Aug-15 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.