entertaining the first million or so times

catherine1999

Senior Member
chinese
"As you can see, the code has two casts, not one. We want the non-const operator[] to call the const one, but if, inside the non-const operator[], we just call operator[], we'll recursively call ourselves. That's only entertaining the first million or so times. To avoid infinite recursion, we have to specify that we want to call the const operator[], but there's no direct way to do that" from <<effective c++ third edtion>>

I am really confused why the writer comes up with something entertains all of sudden? It seems have nothing to do with the context to me.
 
  • Biffo

    Senior Member
    English - England
    It is a way of saying That's only <taking into account/considering> the first million or so times.

    "to entertain <an idea>" is to consider it.

    Example
    For a while I entertained the idea of living on a boat but then I dismissed it as impractical.

    __________________________________________________________________________________________________

    EDIT - my first answer was wrong!!!
    I didn't read the text carefully enough.
    In fact the author is making a 'joke'. He is saying that it is 'fun' or 'interesting' to see the first million recursions but after that the novelty value wears off. In actual fact a stack overflow error would prevent infinite recursion but maybe that isn't strictly relevant to your query.
     
    Last edited:

    catherine1999

    Senior Member
    chinese
    Thanks Biffo. Your interpretion is of great help. I think I understand it better.The writer's humor is sure giving us non-native-speakers a hard time.
    Maybe it runs for millions of loops, then crushs by the reason of stack overflow. It's no more fun anymore.:D
     
    < Previous | Next >
    Top