Re: MinMaxArray



Marc Gravell wrote:
Arrays are immutable.
Well, they can't be resized, but are definitely mutable regarding the contents of an array... but I'm not quite sure how that relates to the question, unless the OP wants to Add(), rathen than just swap items.

Yeah, I realized "immutable" was the wrong word to use (and I managed to confuse myself as well). It was indeed thinking of a collection where you add elements after the fact and want the aggregates to be updated immediately, although then I realized that a mutable collection that can't be resized is just as problematic.

There are various ways of mitigating this, but they're all more or less trying to
fit a square peg in a round hole.

Other pegs are available ;-p
I guess Operator would be an "amost round" peg... some kind of icosagon or similar - there are a few gaps, but it comes close...

I like these "too clever by half" solutions on an intellectual level, but I wouldn't actually stick them in my production code. No offense. :-)

If I want C++, Smalltalk or Haskell (each of which would solve this problem in its own distinct way) I know where to get them. For C#, LINQ's good enough for me... Either that or maybe two specialized classes for Decimal and Double.

--
J.
.



Relevant Pages

  • Re: How big of a difference between VB 6 and .net
    ... > times I wonder if they are requesting .net because they need it or because ... The problem is often the hiring entity (committee or ... Being a square peg in a round hole, ...
    (microsoft.public.vb.general.discussion)
  • Re: Wisconsins offense may be terrible...
    ... year last year and beat UF in their bowel game. ... He will keep the square peg in the round hole until he finds another round ... I can only imagine what losing Terelle Pryor to ...
    (rec.sport.football.college)
  • Re: OT - LOL
    ... It?s tougher out here in the real world but boy is it more fun, ... state is just no place for a square peg in a round hole. ...
    (uk.media.tv.misc)
  • Re: Why relativity does not applies in Industry???
    ... Relativity has many applications... ... Put square peg in round hole. ... Time travel. ...
    (sci.physics.relativity)