skew icon indicating copy to clipboard operation
skew copied to clipboard

Modular system ?

Open booti386 opened this issue 9 years ago • 2 comments

Is a modular system planned ? Or at least, an "ifexists" macro, or a lazy constant assignment ?

booti386 avatar Mar 18 '16 16:03 booti386

I'm not sure what you're asking. Could you give examples or more information? Are those all related or separate? I am planning to do a package system at some point. Skew also supports conditional compilation if that's what you meant by an "ifexists" macro:

if TARGET == .JAVASCRIPT {
  def log(text string) { dynamic.console.log(text) }
} else if TARGET == .CSHARP {
  def log(text string) { dynamic.System.Console.WriteLine(text) }
}

evanw avatar Mar 18 '16 17:03 evanw

It would be useful in order to enable modular compilation, if different projets depends on another. Here is a happy case : A => libZ B => libZ A and B are fully independent, so yeayh.

Here, no problem again : libW => libZ A => libW

But there : libW => libZ A => libW, libZ If libW is an optional module, it means that A must roll-in its own version of libZ. Which will cause conflicts, unless a internal mechanism exists to allow only a single copy of the given library to be included.

So, with an hypothetical ifnexists:

ifnexists LIBZ_ID {
    const LIBZ_ID = 1
    # ...
}

So it could be useful to implement that. :)

booti386 avatar Mar 19 '16 10:03 booti386