Further on Platform Specificity

Ken Ray kray at sonsothunder.com
Sat Aug 7 23:30:17 EDT 2004


> If small developers want or need to create software for multiple
> platforms, it is crucial that they not be expected to maintain multiple
> code bases to do so. To the extent that the toolset they use supports
> OS-specific features and these features are incorporated, they end up
> with a situation where they have to maintain multiple code bases or, in
> the not-less-unattractive alternative, incorporate lots of
> platform-checking conditional code.

"Lots" would depend on what they're trying to do. No way would any of us on
this list maintain multiple code bases... at worst we would write a bunch of
platform specific code.

But aren't we doing that anyway? Something simple like calling "shell" needs
a "if the platform is" switch. I think this is part and parcel of what we as
developers do.

> This kind of thing can kill a small developer.

I disagree. Sticking only to code that is inherently cross-platform can kill
a small developer. UNLESS, RunRev were to make changes/add features that
would over time reduce or eliminate the need to call platform-specific code.

I just finished doing an installer in Rev for a client of mine, and you can
bet there was all sorts of platform-specific code in there, like:

  if the platform is "MacOS" then
    if isOSX() then
      put "/applications" into tDir
    else
      put specialFolderPath("apps") into tDir
    end if
  else
    put specialFolderPath(5) into tDir
  end if

Now if RunRev were to extend "specialFolderPath" so that one call could be
made for all platforms, then I wouldn't need a 'platform' switch.

This kind of stuff happens all the time in my neck of the woods...

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
 




More information about the use-livecode mailing list