> On 31 Aug 2015, at 14:08, Mark Bratcher <mdbra...@gmail.com> wrote:
> 
> Thank you, Holger.
> 
> I understand the pragmatics of the decision. One could argue that, in the 
> current bug case, the `(self new) stream: aStream ; initialize` statement is 
> a bit "off-pattern". :) I think it's a little unfortunate that Pharo deviated 
> from Smalltalk-80 in a small, but fundamental way. I think it means that if I 
> want to write more portable Smalltalk code, I might avoid using "initialize" 
> since its behavior will be different in Pharo (and now GNU) versus other 
> implementations. Such avoidance would be necessary in cases where one wants 
> instance initialization to be deferred after instance creation. 

Yes, it is unfortunate. But if you look at the diff that introduced this 
behavior then
you see that it was used a lot already. In both Pharo and GST there is 
>>#basicNew
as well but I don’t know if this is in an ANSI protocol.

So e.g. this could fix the issue you have debugged:

diff --git a/packages/dbd-mysql/Connection.st b/packages/dbd-mysql/Connection.st
index b97dc89..ef5ac65 100644
--- a/packages/dbd-mysql/Connection.st
+++ b/packages/dbd-mysql/Connection.st
@@ -237,7 +237,7 @@ Object subclass: MySQLPacket [
 
     MySQLPacket class >> on: aStream [
        <category: 'instance creation'>
-       ^(self new)
+       ^(self basicNew)
            stream: aStream;
            initialize
     ]



_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to