Hi Viktor,

Il 12/02/2009 20.20, Viktor Szakáts ha scritto:
Hi Francesco,

Yes, interesting idea to remap a whole set of functions to another namespace. This might help on the "sandboxing" problem when running non-trusted scripts in an app environment. If we define a namespace with all allowed functions and apply that namespace to the macro compiler, this may solve the problem, as not allowed one will simply err. It's also useful for 3rd party lib developers (including contribs).

Exactly what I have in mind.

I don't know the xhb implementation either, so it's difficult to comment, the devil is in the details probably.


AFAIR, the problem is on build time because every file have to be built 3 times, first parsed to add a prefix, second compiled with xharbour, than the result is compiled from C compiler. (This for PRG level)
But this is what I remember reading mailing list on the fly, probably wrong.

Overall I feel this should come a bit later, and even before that it'd be great to separate dialect specific functions and classes into libs, so we get the ability to choose features at runtime, rather than build time. Later with namespace this can be made even more flexible, but it's not a requirement.

We could even go as far to move these dialect libs to contrib, which allows more freedom for developers. In fact we already have one such lib: xhb.lib.

If this becomes a system, we may use some common prefix for these libs (hd = Harbour Dialect): hdxpp, hbfs, hdx, hdfox, hdvo, hbclip. These could replace current HB_COMPAT_* macros, but with much more possibilities.

[ Since we're pretty much compatible with C5.3 without any big drawbacks, and the implementation is finished, there is no need to move it a separate dialect lib. ]

And BTW, it's not just dialects, but even things like WAPI_, if we make it right now, it will be later much easier to just switch to namespaces, as we already have an analogous system.

Agree.

Best regards,

Francesco
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to