[Pharo-project] SmalltalkImage current platformName [WAS] Re: Baseline test results on pharo core 10392
Ok, I write the changeset, but I don't like it hehehehe. What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS' This is not nice. Tomorrow we change the platformName and we have to modify a lot of code. For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them. what do you think? best, Mariano On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
We have OSPlatform. For instance: MacOSXPlatform isActivePlatform HTH, Adrian On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing SmalltalkImage current platformName = 'Mac OS' for MacOSXPlatform isActivePlatform In all places? Obviously, the same with the other platforms. Is there a reason I don't see? just time to do it ? thanks! Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think that it should be done at least in pharo core and more importantly, create a new page in the wiki with the programming recommended tips/techniques and there to include all the tips that appear on the list: - Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc and featured in the pharo website to avoid introducing this bad idioms again Miguel Cobá 2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this:   ^SmalltalkImage current platformName  = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ Â Â ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Tue, Jul 28, 2009 at 4:38 PM, Miguel Cobá <miguel.coba@gmail.com> wrote:
I think that it should be done at least in pharo core and more importantly,
Yes, I wanted to say to do it in Pharo core at least. Then, it's a task of each external package developer to change their code to use this methods.
create a new page in the wiki with the programming recommended tips/techniques and there to include all the tips that appear on the list:
- Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc
and featured in the pharo website to avoid introducing this bad idioms again
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch>
wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com
wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running. As an example, see the FileDirectory>>slash It is very confusing for people to see isXXXPlatform in code, because it tells almost nothing about what platform-specific feature you rely on. So, i'd prefer to see the code which asks some provider object about support of given capability (it could be OSPlatform), instead of placing isMacOS, isWindows , isUnix into code, which causing a lot of frustration to people who would want to port your code to other platforms, or simply check, if their platform provides required feature(s). Don't forget, that each time someone sees isMacOs, or isWindows etc.. he thinks: 'duh.. this thing wont work on my platform'. Instead of thinking in a different way: 'duh.. this thing depends on following OS feature, lets take a look if i can hack it to wire it up with my OS' 2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:38 PM, Miguel Cobá <miguel.coba@gmail.com> wrote:
I think that it should be done at least in pharo core and more importantly,
Yes, I wanted to say to do it in Pharo core at least. Then, it's a task of each external package developer to change their code to use this methods.
create a new page in the wiki with the programming recommended tips/techniques and there to include all the tips that appear on the list:
- Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc
and featured in the pharo website to avoid introducing this bad idioms again
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this:   ^SmalltalkImage current platformName  = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ Â Â ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
+1 On Jul 28, 2009, at 8:39 PM, Igor Stasenko wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
As an example, see the FileDirectory>>slash
It is very confusing for people to see isXXXPlatform in code, because it tells almost nothing about what platform-specific feature you rely on. So, i'd prefer to see the code which asks some provider object about support of given capability (it could be OSPlatform), instead of placing isMacOS, isWindows , isUnix into code, which causing a lot of frustration to people who would want to port your code to other platforms, or simply check, if their platform provides required feature(s).
Don't forget, that each time someone sees isMacOs, or isWindows etc.. he thinks: 'duh.. this thing wont work on my platform'. Instead of thinking in a different way: 'duh.. this thing depends on following OS feature, lets take a look if i can hack it to wire it up with my OS'
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:38 PM, Miguel Cobá <miguel.coba@gmail.com> wrote:
I think that it should be done at least in pharo core and more importantly,
Yes, I wanted to say to do it in Pharo core at least. Then, it's a task of each external package developer to change their code to use this methods.
create a new page in the wiki with the programming recommended tips/techniques and there to include all the tips that appear on the list:
- Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc
and featured in the pharo website to avoid introducing this bad idioms again
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/ pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say: 1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere. 2) Let's go step by step. I would first remove all the "SmalltalkImage current platformName = 'Mac OS'" (and others platforms) from all places. Once we have this, we can see senders of isUnix for example, and try to see how to make this more OO instead of this if. (as you said).
As an example, see the FileDirectory>>slash
It is very confusing for people to see isXXXPlatform in code, because it tells almost nothing about what platform-specific feature you rely on. So, i'd prefer to see the code which asks some provider object about support of given capability (it could be OSPlatform), instead of placing isMacOS, isWindows , isUnix into code, which causing a lot of frustration to people who would want to port your code to other platforms, or simply check, if their platform provides required feature(s).
Don't forget, that each time someone sees isMacOs, or isWindows etc.. he thinks: 'duh.. this thing wont work on my platform'. Instead of thinking in a different way: 'duh.. this thing depends on following OS feature, lets take a look if i can hack it to wire it up with my OS'
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:38 PM, Miguel Cobá <miguel.coba@gmail.com>
wrote:
I think that it should be done at least in pharo core and more importantly,
Yes, I wanted to say to do it in Pharo core at least. Then, it's a task of each external package developer to change their code to use this methods.
create a new page in the wiki with the programming recommended tips/techniques and there to include all the tips that appear on the list:
- Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc
and featured in the pharo website to avoid introducing this bad idioms again
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in
different
packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com> wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java
makes
them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say:
1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere.
The class OSPlatform is quite small. I would vote for: - implementing the following methods OSPlatform>>isMacOSX ^ false OSPlatform>>isWin32 ^ false OSPlatform>>isUnix ^ false and then MacOSXPlatform>>isMacOSX ^ true UnixPlatform>>isUnix ^ true Win32Platform>>isWin32 ^ true - when you want to test the platform, just do: OSPlatform current isMacOSX or OSPlatform current isWin32 What do you think? -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
2009/7/29 Damien Cassou <damien.cassou@gmail.com>:
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say:
1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere.
The class OSPlatform is quite small. I would vote for:
- implementing the following methods
OSPlatform>>isMacOSX  ^ false OSPlatform>>isWin32  ^ false OSPlatform>>isUnix  ^ false
and then
MacOSXPlatform>>isMacOSX  ^ true UnixPlatform>>isUnix  ^ true Win32Platform>>isWin32  ^ true
- when you want to test the platform, just do:
OSPlatform current isMacOSX
or
OSPlatform current isWin32
What do you think?
How about shortcut methods then? OSPlatform class>>isMacOSX ^ self current isMacOSX etc...
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
On Wed, Jul 29, 2009 at 4:02 PM, Igor Stasenko<siguctua@gmail.com> wrote:
How about shortcut methods then?
OSPlatform class>>isMacOSX Â ^ self current isMacOSX
Not sure it is that useful but I don't really care. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
2009/7/29 Igor Stasenko <siguctua@gmail.com>:
2009/7/29 Damien Cassou <damien.cassou@gmail.com>:
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say:
1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere.
The class OSPlatform is quite small. I would vote for:
- implementing the following methods
OSPlatform>>isMacOSX  ^ false OSPlatform>>isWin32  ^ false OSPlatform>>isUnix  ^ false
and then
MacOSXPlatform>>isMacOSX  ^ true UnixPlatform>>isUnix  ^ true Win32Platform>>isWin32  ^ true
- when you want to test the platform, just do:
OSPlatform current isMacOSX
or
OSPlatform current isWin32
What do you think?
How about shortcut methods then?
OSPlatform class>>isMacOSX Â ^ self current isMacOSX
etc...
Or let it be a global? like Smalltalk, Processor, etc... Do we write SystemDictionary current?
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/7/29 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2009/7/29 Igor Stasenko <siguctua@gmail.com>:
2009/7/29 Damien Cassou <damien.cassou@gmail.com>:
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say:
1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere.
The class OSPlatform is quite small. I would vote for:
- implementing the following methods
OSPlatform>>isMacOSX  ^ false OSPlatform>>isWin32  ^ false OSPlatform>>isUnix  ^ false
and then
MacOSXPlatform>>isMacOSX  ^ true UnixPlatform>>isUnix  ^ true Win32Platform>>isWin32  ^ true
- when you want to test the platform, just do:
OSPlatform current isMacOSX
or
OSPlatform current isWin32
What do you think?
How about shortcut methods then?
OSPlatform class>>isMacOSX Â ^ self current isMacOSX
etc...
Or let it be a global? like Smalltalk, Processor, etc... Do we write SystemDictionary current?
you mean global var 'Platform'? there is OSPlatform global var. Why not use it instead? Or, someone please tell me, why everyone tend to mis-use the singleton pattern in a form: 'Foo current' , whereas the Foo is already a singleton???
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
On Wed, Jul 29, 2009 at 8:30 PM, Igor Stasenko<siguctua@gmail.com> wrote:
Or, someone please tell me, why everyone tend to mis-use the singleton pattern in a form: 'Foo current' , whereas the Foo is already a singleton???
Because you can transform 'Foo current' in a non-singleton if you want to later. This is not the case of Foo. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
2009/7/30 Damien Cassou <damien.cassou@gmail.com>:
On Wed, Jul 29, 2009 at 8:30 PM, Igor Stasenko<siguctua@gmail.com> wrote:
Or, someone please tell me, why everyone tend to mis-use the singleton pattern in a form: 'Foo current' , whereas the Foo is already a singleton???
Because you can transform 'Foo current' in a non-singleton if you want to later. This is not the case of Foo.
But this will never be the case for things like OSPlatform, isnt? So, why lenghtening the path to get to interesting feature/protocol, by introducing #current ?
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
Am 29.07.2009 um 15:54 schrieb Damien Cassou:
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 5:39 PM, Igor Stasenko <siguctua@gmail.com> wrote:
I think that all such kind of queries (like isXXXPlatform) should be not included and not used in a well-designed system. If you want some capability - then you should ask directly for it, irrespectively on what platform you are currently running.
I am agree. I really believe in the phrase "tell don't ask". However, I have a couple of things to say:
1) It is not as easy as it seems. If you want to delegate to another object and be polymorphic regarding the platform you must reify a couple of classes (in your slash it is easy because you have the File hierarchy). I mean, you cannot put everything in the Platform class. And this must be done in every place. You must really understand that piece of code to change it. I can do this in my projects, but I don't know about to do it everywhere.
The class OSPlatform is quite small. I would vote for:
- implementing the following methods
OSPlatform>>isMacOSX ^ false OSPlatform>>isWin32 ^ false OSPlatform>>isUnix ^ false
and then
MacOSXPlatform>>isMacOSX ^ true UnixPlatform>>isUnix ^ true Win32Platform>>isWin32 ^ true
- when you want to test the platform, just do:
OSPlatform current isMacOSX
or
OSPlatform current isWin32
What do you think?
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking... Regards Andreas
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de> wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
Am 29.07.2009 um 17:46 schrieb Damien Cassou:
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de> wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. A start in what direction? Is there a plan to change this later? And if so, when, who and how?
Regards Andreas
On 29.07.2009, at 14:02, Andreas Wacknitz wrote:
Am 29.07.2009 um 17:46 schrieb Damien Cassou:
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de> wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. A start in what direction? Is there a plan to change this later? And if so, when, who and how?
The old Squeak desease was that nothing ever was done, because at some point it was found that "we could do better". This resulted in *complete* paralysis. For Pharo, the idea is to do something if it´s better. Just imagine what you can do in 10 years if you do a lot of little things a little bit better. Instead of doing nothing and waiting for perfection. Marcus
Am 29.07.2009 um 20:08 schrieb Marcus Denker:
On 29.07.2009, at 14:02, Andreas Wacknitz wrote:
Am 29.07.2009 um 17:46 schrieb Damien Cassou:
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de> wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. A start in what direction? Is there a plan to change this later? And if so, when, who and how?
The old Squeak desease was that nothing ever was done, because at some point it was found that "we could do better". This resulted in *complete* paralysis.
For Pharo, the idea is to do something if it´s better. Just imagine what you can do in 10 years if you do a lot of little things a little bit better. Instead of doing nothing and waiting for perfection.
I understand your point but part of Squeak's problem is its actual state. Many things are really messy and crappy. While the proposed solution might be better for the actual problem (a special unit test for the Mac), I really fear a new source for code rot. When this isXXX will be established it will be used in other situations sooner or later. And I can't see that OSPlatform current isMacOSX is really that much better than SmalltalkImage current platformName = 'Mac OS' Andreas
On Wed, Jul 29, 2009 at 6:06 PM, Andreas Wacknitz <A.Wacknitz@gmx.de> wrote:
Am 29.07.2009 um 20:08 schrieb Marcus Denker:
On 29.07.2009, at 14:02, Andreas Wacknitz wrote:
Am 29.07.2009 um 17:46 schrieb Damien Cassou:
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de> wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code delegates." Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. A start in what direction? Is there a plan to change this later? And if so, when, who and how?
The old Squeak desease was that nothing ever was done, because at some point it was found that "we could do better". This resulted in *complete* paralysis.
For Pharo, the idea is to do something if it´s better. Just imagine what you can do in 10 years if you do a lot of little things a little bit better. Instead of doing nothing and waiting for perfection.
I understand your point but part of Squeak's problem is its actual state. Many things are really messy and crappy. While the proposed solution might be better for the actual problem (a special unit test for the Mac), I really fear a new source for code rot. When this isXXX will be established it will be used in other situations
Yes. I am agree. The thing is, who will do it? Ho has the time to understand every place and change it ?
sooner or later. And I can't see that OSPlatform current isMacOSX is really that much better than SmalltalkImage current platformName = 'Mac OS'
Yes it is. I it is not MUCH better, but a bit better and easy to implement. Tomorrow the platform name changes and you have to change your code all over the image. At least, with this, you have the hardcoded in a single place. After this, with a single "senders" you can see where it is used and how to modify this for a more OO stuff.
Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Am 29.07.2009 um 21:13 schrieb Mariano Martinez Peck:
On Wed, Jul 29, 2009 at 6:06 PM, Andreas Wacknitz <A.Wacknitz@gmx.de> wrote:
Am 29.07.2009 um 20:08 schrieb Marcus Denker:
On 29.07.2009, at 14:02, Andreas Wacknitz wrote:
Am 29.07.2009 um 17:46 schrieb Damien Cassou:
On Wed, Jul 29, 2009 at 5:20 PM, Andreas Wacknitz<A.Wacknitz@gmx.de
wrote:
When I learned object orientation one of the first things I encountered was: "Procedural code makes decisions, object oriented code
delegates."
Or, sometimes simply: "Tell, don't ask!". For me this looks like asking...
I agree but this would be a good start I think. A start in what direction? Is there a plan to change this later? And if so, when, who and how?
The old Squeak desease was that nothing ever was done, because at some point it was found that "we could do better". This resulted in *complete* paralysis.
For Pharo, the idea is to do something if it´s better. Just imagine what you can do in 10 years if you do a lot of little things a little bit better. Instead of doing nothing and waiting for perfection.
I understand your point but part of Squeak's problem is its actual state. Many things are really messy and crappy. While the proposed solution might be better for the actual problem (a special unit test for the Mac), I really fear a new source for code rot. When this isXXX will be established it will be used in other situations
Yes. I am agree. The thing is, who will do it? Ho has the time to understand every place and change it ?
sooner or later. And I can't see that OSPlatform current isMacOSX is really that much better than SmalltalkImage current platformName = 'Mac OS'
Yes it is. I it is not MUCH better, but a bit better and easy to implement. Tomorrow the platform name changes and you have to change your code all over the image. At least, with this, you have the hardcoded in a single place. After this, with a single "senders" you can see where it is used and how to modify this for a more OO stuff.
I beg to disagree. First, you could also search for senders of "platformName". Second, what to do when you need to add a new platform? At the moment there is "isUnix". But there might be differences between Linux, Solaris, RiscOS, FreeBSD, ... You don't want a single search and multiple change but a single search AND change. In my opinion the proposed code is only a minor improvement. Andreas
Andreas Wacknitz wrote:
Am 29.07.2009 um 21:13 schrieb Mariano Martinez Peck:
On Wed, Jul 29, 2009 at 6:06 PM, Andreas Wacknitz <A.Wacknitz@gmx.de <mailto:A.Wacknitz@gmx.de>> wrote:
Am 29.07.2009 um 20:08 schrieb Marcus Denker:
sooner or later. And I can't see that OSPlatform current isMacOSX is really that much better than SmalltalkImage current platformName = 'Mac OS'
Yes it is. I it is not MUCH better, but a bit better and easy to implement. Tomorrow the platform name changes and you have to change your code all over the image. At least, with this, you have the hardcoded in a single place. After this, with a single "senders" you can see where it is used and how to modify this for a more OO stuff.
I beg to disagree. First, you could also search for senders of "platformName". Second, what to do when you need to add a new platform? At the moment there is "isUnix". But there might be differences between Linux, Solaris, RiscOS, FreeBSD, ...
There can be considerable differences. e.g. the gnu tools used by Linux have different command line options from the BSD tools which could impact things like OSProcess.
You don't want a single search and multiple change but a single search AND change. In my opinion the proposed code is only a minor improvement.
Maybe one possible solution would be to select on features, e.g. something like PlatformFeatures>>#menuSupport? I believe Common Lisp does something like that with their *features* variable.
2009/7/30 Douglas Brebner <squeaklists@fang.demon.co.uk>:
Andreas Wacknitz wrote:
Am 29.07.2009 um 21:13 schrieb Mariano Martinez Peck:
On Wed, Jul 29, 2009 at 6:06 PM, Andreas Wacknitz <A.Wacknitz@gmx.de <mailto:A.Wacknitz@gmx.de>> wrote:
  Am 29.07.2009 um 20:08 schrieb Marcus Denker:
  sooner or later. And I can't see that       OSPlatform current isMacOSX   is really that much better than       SmalltalkImage current platformName = 'Mac OS'
Yes it is. I it is not MUCH better, but a bit better and easy to implement. Tomorrow the platform name changes and you have to change your code all over the image. At least, with this, you have the hardcoded in a single place. After this, with a single "senders" you can see where it is used and how to modify this for a more OO stuff.
I beg to disagree. First, you could also search for senders of "platformName". Second, what to do when you need to add a new platform? At the moment there is "isUnix". But there might be differences between Linux, Solaris, RiscOS, FreeBSD, ...
There can be considerable differences. e.g. the gnu tools used by Linux have different command line options from the BSD tools which could impact things like OSProcess.
You don't want a single search and multiple change but a single search AND change. In my opinion the proposed code is only a minor improvement.
Maybe one possible solution would be to select on features, e.g. something like PlatformFeatures>>#menuSupport? I believe Common Lisp does something like that with their *features* variable.
right, this is what i'm actually proposing.. use it in a way like: menuBuilder := OSProcess platformMenuBuilder. menuBuilder ifNotNil: [ menuBuilder addMenu: #('File Edit Help Other Boring Stuff')... ]
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
2009/7/30 Igor Stasenko <siguctua@gmail.com>: [snip ]
right, this is what i'm actually proposing.. use it in a way like:
menuBuilder := OSProcess platformMenuBuilder.
menuBuilder ifNotNil: [ Â menuBuilder addMenu: #('File Edit Help Other Boring Stuff')... ]
err.. OSPlatform, not OSProcess :) -- Best regards, Igor Stasenko AKA sig.
On Thu, Jul 30, 2009 at 04:40:35AM +0300, Igor Stasenko wrote:
2009/7/30 Igor Stasenko <siguctua@gmail.com>: [snip ]
right, this is what i'm actually proposing.. use it in a way like:
menuBuilder := OSProcess platformMenuBuilder.
menuBuilder ifNotNil: [ ?? menuBuilder addMenu: #('File Edit Help Other Boring Stuff')... ]
err.. OSPlatform, not OSProcess :)
;-) FWIW, the implementation that I used for OSProcess is: OSProcess class>>isWindows OSProcess class>>isUnix OSProcess class>>isUnixMac OSProcess class>>isNonUnixMac OSProcess class>>isRiscOS (1) OSProcess class>>isOS2 (2) And yes, Squeak does run on platforms other than unix and win32. Hopefully it is not too much of a stretch to envision #isSqueakNOS, #isPlan9, #isVMS, #isChrome, and #isTripos (3). And Tripos was the host for BCPL (4) which was a host for early Smalltalk, which begat Squeak, which inspired Pharo, which leads us to this discussion, so give some love to Tripos and also to Martin Richards (5) who continues to advance the development of several of these seminal technologies. Dave (1) http://en.wikipedia.org/wiki/Riscos http:/rowledge.org/tim/squeak/RISCOSSqueak.html (2) http://en.wikipedia.org/wiki/OS2 http://www.jvuletich.org/Squeak/SqueakForOS2/SqueakForOS2Eng.html (3) http://en.wikipedia.org/wiki/TRIPOS http://www.cl.cam.ac.uk/~mr10/Cintpos.html (4) http://en.wikipedia.org/wiki/BCPL http://www.cl.cam.ac.uk/~mr10/BCPL.html (5) http://www.cl.cam.ac.uk/~mr10
David T. Lewis wrote:
FWIW, the implementation that I used for OSProcess is:
OSProcess class>>isWindows OSProcess class>>isUnix OSProcess class>>isUnixMac OSProcess class>>isNonUnixMac OSProcess class>>isRiscOS (1) OSProcess class>>isOS2 (2)
And yes, Squeak does run on platforms other than unix and win32. Hopefully it is not too much of a stretch to envision #isSqueakNOS, #isPlan9, #isVMS, #isChrome, and #isTripos (3). And Tripos was the host for BCPL (4) which was a host for early Smalltalk, which begat Squeak, which inspired Pharo, which leads us to this discussion, so give some love to Tripos and also to Martin Richards (5) who continues to advance the development of several of these seminal technologies.
I believe there's a port to Syllable too, and I expect to see one to AROS or another AmigaOS version :)
On Thu, Jul 30, 2009 at 05:51:02AM +0100, Douglas Brebner wrote:
David T. Lewis wrote:
FWIW, the implementation that I used for OSProcess is:
OSProcess class>>isWindows OSProcess class>>isUnix OSProcess class>>isUnixMac OSProcess class>>isNonUnixMac OSProcess class>>isRiscOS (1) OSProcess class>>isOS2 (2)
And yes, Squeak does run on platforms other than unix and win32. Hopefully it is not too much of a stretch to envision #isSqueakNOS, #isPlan9, #isVMS, #isChrome, and #isTripos (3). And Tripos was the host for BCPL (4) which was a host for early Smalltalk, which begat Squeak, which inspired Pharo, which leads us to this discussion, so give some love to Tripos and also to Martin Richards (5) who continues to advance the development of several of these seminal technologies.
I believe there's a port to Syllable too, and I expect to see one to AROS or another AmigaOS version :)
[veering hopelessly off topic, sorry] The original AmigoOS was Tripos: http://www.amigahistory.co.uk/tripos.html
David T. Lewis wrote:
On Thu, Jul 30, 2009 at 05:51:02AM +0100, Douglas Brebner wrote:
David T. Lewis wrote:
FWIW, the implementation that I used for OSProcess is:
OSProcess class>>isWindows OSProcess class>>isUnix OSProcess class>>isUnixMac OSProcess class>>isNonUnixMac OSProcess class>>isRiscOS (1) OSProcess class>>isOS2 (2)
And yes, Squeak does run on platforms other than unix and win32. Hopefully it is not too much of a stretch to envision #isSqueakNOS, #isPlan9, #isVMS, #isChrome, and #isTripos (3). And Tripos was the host for BCPL (4) which was a host for early Smalltalk, which begat Squeak, which inspired Pharo, which leads us to this discussion, so give some love to Tripos and also to Martin Richards (5) who continues to advance the development of several of these seminal technologies.
I believe there's a port to Syllable too, and I expect to see one to AROS or another AmigaOS version :)
[veering hopelessly off topic, sorry] The original AmigoOS was Tripos: http://www.amigahistory.co.uk/tripos.html
The original Amiga*D*OS was Tripos, AmigaOS was more than that (as that page mentions, Intuition already existed). Though I agree, this is very offtopic :)
Yes and at the end we should have a kind of architecture for pharo. Stef On Jul 28, 2009, at 7:38 PM, Miguel Cobá wrote:
I think that it should be done at least in pharo core and more importantly, create a new page in the wiki with the programming recommended tips/ techniques and there to include all the tips that appear on the list:
- Use the OSPlatform isActivePlatform and children - Not to use the Utilities deprecated classes - The case against SmalltalkImage current that appear in a thread a couple of days ago - etc
and featured in the pharo website to avoid introducing this bad idioms again
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 4:24 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
We have OSPlatform. For instance:
MacOSXPlatform isActivePlatform
Nice! I wasn't aware of them...so, what about changing
SmalltalkImage current platformName = 'Mac OS'
for
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see? just time to do it ?
thanks!
Mariano
HTH, Adrian
On Jul 28, 2009, at 18:55 , Mariano Martinez Peck wrote:
Ok, I write the changeset, but I don't like it hehehehe.
What about puting isMacintosh, isUnix and isWindows in SmalltalkImage ? I think those methods are useful and perhaps many people in different packages are doing things like this: ^SmalltalkImage current platformName = 'Mac OS'
This is not nice. Tomorrow we change the platformName and we have to modify a lot of code.
For example, I searched the string "SmalltalkImage current platformName = 'Mac OS'" and it is in a lot of places. I think we should get rid of them.
what do you think?
best,
Mariano
On Tue, Jul 28, 2009 at 3:18 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
Yes, if you tested it and think it is good, please change the status to verified.
Cheers, Adrian
On Jul 28, 2009, at 17:12 , Miguel Cobá wrote:
should the ticket be marked as verified?
On Tue, Jul 28, 2009 at 10:10 AM, Miguel Cobá<miguel.coba@gmail.com
wrote:
It works ok on my
Debian Linux 5.0 (Lenny) i386. Debian Linux 5.0 (Lenny) amd64.
Miguel Cobá
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
On Tue, Jul 28, 2009 at 11:58 AM, Adrian Lienhard <adi@netstyle.ch> wrote:
On Jul 28, 2009, at 14:51 , Mariano Martinez Peck wrote:
On Tue, Jul 28, 2009 at 5:42 AM, Damien Cassou <
damien.cassou@gmail.com
wrote:
2009/7/27 Mariano Martinez Peck <marianopeck@gmail.com>:
HostSystemMenusTest class>>expectedFailures
SmalltalkImage current platformName = 'Mac OS' ifFalse:[ ^#(#testXXX #testYYY)]. ]. ^#()
Expected failures are indications of bugs that are not yet corrected. Does not seem to apply here.
ahhh okok. So...shall we go for torsten solution ?
Yes.
http://code.google.com/p/pharo/issues/detail?id=996
I also attached a possible changeset.
best,
Mariano
Adrian
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see?
I don't like this solution because it depends on the existence of the MacOSXPlatform class which is an implementation detail. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
On Wed, Jul 29, 2009 at 5:11 AM, Damien Cassou <damien.cassou@gmail.com>wrote:
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see?
I don't like this solution because it depends on the existence of the MacOSXPlatform class which is an implementation detail.
Why you say MacOSXPlatform is an implementation detail? Perhaps we can ask this messages to SmalltalkImage and then this delegates to the platform? However, I rather any of this solutions than having all the hardcoded string spear around in the image.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/7/29 Mariano Martinez Peck <marianopeck@gmail.com>:
On Wed, Jul 29, 2009 at 5:11 AM, Damien Cassou <damien.cassou@gmail.com> wrote:
2009/7/28 Mariano Martinez Peck <marianopeck@gmail.com>:
MacOSXPlatform isActivePlatform
In all places? Obviously, the same with the other platforms.
Is there a reason I don't see?
I don't like this solution because it depends on the existence of the MacOSXPlatform class which is an implementation detail.
Why you say MacOSXPlatform is an implementation detail? Perhaps we can ask this messages to SmalltalkImage and then this delegates to the platform?
Because this version forces the class MacOSXPlatform to exist in the image. It adds a strong dependency on the implementation of the Platform library (namely having classes for each kind of platform). -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
participants (11)
-
Adrian Lienhard -
Andreas Wacknitz -
Damien Cassou -
David T. Lewis -
Douglas Brebner -
Igor Stasenko -
Marcus Denker -
Mariano Martinez Peck -
Miguel Cobá -
Nicolas Cellier -
Stéphane Ducasse