On Tue, 07 Oct 2008 23:54:02 +0100
Keith Hodges <[EMAIL PROTECTED]> wrote:
> After all purists don't have to interface to databases... do they?
Or users:
+---+
| |
| Please enter your comment: |
|
Rob Rothwell wrote:
> Just today I was loading objects from an ODBCRow and wrote a:
>
> Collection>>addIfNotNilOrBlank !
>
> Like you said...sometimes you get '', sometimes you get nil!
>
> Take care,
>
> Rob
So...
if it becomes something that every "pragmatic" user would like to add at
least once
Just today I was loading objects from an ODBCRow and wrote a:
Collection>>addIfNotNilOrBlank !
Like you said...sometimes you get '', sometimes you get nil!
Take care,
Rob
On Tue, Oct 7, 2008 at 6:02 PM, Keith Hodges <[EMAIL PROTECTED]>wrote:
> When I think about this issue in different terms
When I think about this issue in different terms I think it makes more
sense. No matter how perfect my code I find myself interfacing to things
like MySQL where it is happy to return nil when it means an empty string.
someValue ifNotUsefulUse: [ defaultValue ].
but then the question "what does us
On Oct 6, 2008, at 11:28 PM, Michael Roberts wrote:
I agree with Lukas, and the other comments on the naming that really
you imply a test for nil first before the empty. My experience with
coming across and recalling heavy usage is that the receiver is always
a String. I took it to be a conve
The arguments to not remove it are inertia as usual.
I see 163 senders in the 10074 image and probably many more in
Squeak packages.
Le ver est dans le fruit.
I can understand that to manage cancel button the UI returns nil
Now I do not see the gain with always returning '' even on cancel.
Strings, eh??? Now this makes more sense. I have defined some methods named
#isNonTrivial that I use in some "defensive" situations (ok, a few are quite
simly cowardly), all the way up to decisions about how to represent chunks
of medical records. Most senders are of the latter type. Lookin
I agree with Lukas, and the other comments on the naming that really
you imply a test for nil first before the empty. My experience with
coming across and recalling heavy usage is that the receiver is always
a String. I took it to be a convenience (laziness) for typing the
longer form during stri
Stéphane Ducasse <[EMAIL PROTECTED]> writes:
>
> Hi
>
> I would like to have your take on that one:
>
> isEmpty
> "Answer whether the receiver contains any elements."
>
> ^self size = 0
>
> Why do we need ifEmptyOrNil:
>
> isEmptyOrNil
>