[squeak-dev] The Inbox: System-mt.1161.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed May 27 09:07:21 UTC 2020


Hi Christian.

Thanks for the info! :-)

I suppose that the platform name 'unix' can only be a starting point for any platform-specific code. There is already #platformSubtype.

You are right. If bridge classes tend to duplicate such specialization logic, it makes sense to move it back to a generic platform object for other bridge classes to re-use. At best, one can generalize any subtlety to something that can be answered for all operating systems. Then, the question of subclassing vs. (state) composition is just a matter of taste.

Thinking about which layer moves faster than another, I prefer looking for #wordSize etc. over looking for #isUnix etc. If operating systems follow some standards (such as POSIX), this approach might lead to cleaner in-image code. :-) Not sure.

Best,
Marcel
Am 27.05.2020 10:17:03 schrieb Christian Kellermann <ckeen at pestilenz.org>:
Hey Marcel,

* Marcel Taeumel [200527 08:37]:
> Hi Jacob,
>
> I just briefly looked at OSPlatform (and subclasses) in Pharo 7. I think those classes try to hold too much information from too many domains, which is sparkling a need for those platform subclasses.

If I may chime in, I did a port of Pharo to OpenBSD once, got it barely running
with all its ancient deps at the time...

But what has bitten me a lot in the FFI interface has been the assumption that
'unix' means linux and there has been no easy way to further distinguish the
subtle differences. Such as the architecture name for the 64bit platform, which
is 'amd64' for OpenBSD as an easy example. That has lead to ugly code which would
have been resolvable with more refactoring and fiddling apart the unix class into
more subclasses but I was a beginning smalltalker and fiddling with an integral
part of the Pharo image seemed daunting.

So I guess my summary is: If you settle for something called 'unix' don't make
assumptions that it's linux like, instead make it easy to subclass it further.

Thanks!

Christian

--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200527/dfc699bc/attachment.html>


More information about the Squeak-dev mailing list