We've already seen the
import keyword that allows us to import all the classes of a module. This keyword can be used to write some cross-platform code. Indeed, it is the preferred way to do so, when working with packages that have the same layout. It has the advantage of being easily readable and does not mean adding three lines every time you want to access a platform-specific package.
So, here's a simple example: imagine you want to target Neko and PHP and want to use the
println method available in
php.Lib.println (these methods allow you to write a line of text on the
stdout). As you can see here, regarding what we are going to use, the
php package have the same layout (indeed, ...