[Vm-dev] Adding new primitives to FilePlugin

David T. Lewis lewis at mail.msen.com
Fri Sep 23 23:15:51 UTC 2016


+1000 to everything Tim says below.

Dave

On Fri, Sep 23, 2016 at 11:24:39AM -0700, tim Rowledge wrote:
> 
> While you???re experimenting you can obviously throw any wild and crazy code you like into a plugin. 
> 
> If you want to provide some specialised code that not everyone will want, then a separate plugin is probably better, even if it meant effectively duplicating something like the SQFile struct. The only time it could become a real problem would be if the original FilePlugin definition were to be changed - that hasn???t happened in a while. 
> 
> And you can see in FilePlugin.h that you can get away with different platforms having slightly different structs anyway since the internal are completely hidden from the image. For most cases simply including FilePlugin.h would solve the issue.
> 
> A potentially better solution would be to provide platform specific plugins where needed and move the portability wrapping up to the image. There is no technical barrier to having separate platform specific classes for the lowest levels of things like file access, with a suitable platform specific plugin (or FFI or Alien) interface. Trying to fit all the platform hiding into a plugin can cause some real ugliness in some cases.
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: FLR: Flash Lights Randomly
> 


More information about the Vm-dev mailing list