[RFC] #noneSatisfy: vs. #noneSatisfies:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[RFC] #noneSatisfy: vs. #noneSatisfies:

Paolo Bonzini-2
I'd appreciate a word from native English speakers.  Squeak has
#noneSatisfy: but the correct one from the grammar POV seems
#noneSatisfies: to me.

Paolo

2008-03-19  Paolo Bonzini  <[hidden email]>

        * kernel/Collection.st: Rename #noneSatisfy: to #noneSatisfies:.

diff --git a/kernel/Collection.st b/kernel/Collection.st
index 056a6d3..4d0fd3f 100644
--- a/kernel/Collection.st
+++ b/kernel/Collection.st
@@ -399,7 +399,7 @@ of objects.'>
  ^true
     ]
 
-    noneSatisfy: aBlock [
+    noneSatisfies: aBlock [
  "Search the receiver for an element for which aBlock returns true.
  Answer true if none does, false otherwise."
 
diff --git a/packages/seaside/PORTING b/packages/seaside/PORTING
index 92a6726..1220c8d 100644
--- a/packages/seaside/PORTING
+++ b/packages/seaside/PORTING
@@ -102,6 +102,8 @@ for i in *.st Seaside-Tests-Functional.st; do
        (Time secondClock)' \
     -r'(``@obj beginsWith: ``@arg2 )->
        (``@obj startsWith: ``@arg2)' \
+    -r'(``@obj noneSatisfy: ``@arg2 )->
+       (``@obj noneSatisfies: ``@arg2)' \
     -r'(``@obj asUnicode)->
        (``@obj codePoint)' \
     -r'(``@obj trimBlanks)->
diff --git a/packages/seaside/core/Seaside-Core.st b/packages/seaside/core/Seaside-Core.st
index 864a377..ff75db5 100644
--- a/packages/seaside/core/Seaside-Core.st
+++ b/packages/seaside/core/Seaside-Core.st
@@ -3,7 +3,7 @@ String extend [
     asCapitalizedPhrase [
  <category: '*Seaside-Core'>
  | read words currentWord capitalizedWord |
- (self noneSatisfy: [:ea | ea isLowercase]) ifTrue: [^self].
+ (self noneSatisfies: [:ea | ea isLowercase]) ifTrue: [^self].
  words := WriteStream on: String new.
  read := ReadStream on: self.
  [read atEnd] whileFalse:
@@ -9534,7 +9534,7 @@ sub
  self main = 'text' ifTrue: [^false].
  self main = 'application' ifFalse: [^true].
  subTypes := self sub findTokens: '+'.
- ^subTypes noneSatisfy: [:each | #('x-javascript' 'xml') includes: each]
+ ^subTypes noneSatisfies: [:each | #('x-javascript' 'xml') includes: each]
     ]
 
     isNonStandard [
diff --git a/packages/seaside/core/Seaside-Tests.st b/packages/seaside/core/Seaside-Tests.st
index b6e43ef..37df882 100644
--- a/packages/seaside/core/Seaside-Tests.st
+++ b/packages/seaside/core/Seaside-Tests.st
@@ -2402,8 +2402,8 @@ TestCase subclass: WAFileLibraryTest [
 
     testNoneStatisfy [
  <category: 'testing'>
- self deny: (#(1 2 3) noneSatisfy: [:each | each even]).
- self assert: (#(1 3 5) noneSatisfy: [:each | each even])
+ self deny: (#(1 2 3) noneSatisfies: [:each | each even]).
+ self assert: (#(1 3 5) noneSatisfies: [:each | each even])
     ]
 
     testStandardFiles [

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

RE: [RFC] #noneSatisfy: vs. #noneSatisfies:

Ramon Leon-5
>
> I'd appreciate a word from native English speakers.  Squeak has
> #noneSatisfy: but the correct one from the grammar POV seems
> #noneSatisfies: to me.
>
> Paolo

IMHO, both would be acceptable grammar but the latter would probably be more
often used in a conversation.  In any case, I vote for compatibility!

Ramon Leon
http://onsmalltalk.com



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] #noneSatisfy: vs. #noneSatisfies:

Frank Sergeant
In reply to this post by Paolo Bonzini-2
Paolo Bonzini <[hidden email]> wrote:

> I'd appreciate a word from native English speakers.  Squeak has
> #noneSatisfy: but the correct one from the grammar POV seems
> #noneSatisfies: to me.

My girlfriend's father insists that "none" should always be singular.
His reason is that it stands for "not one".  Recently, somewhere on the
web, a grammar article seemed to say that "none" could stand for "not
any" as well as "not one"; thus singular or plural is correct.  I don't
see how that helps.  Throughout my life, I have tended to treat "none"
as plural.  "None dare call it treason".  "None of the rabbits are
eating well."  Etc.

So, intellectually, I tend to agree that it should be singular and also
that either singular or plural is acceptable.  Still, the plural usage
falls more naturally upon my ear (even if it shouldn't?).


--
Frank


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk