Export ?

Adam D. Ruppe destructionator at gmail.com
Wed Apr 11 13:04:05 PDT 2012


On Wednesday, 11 April 2012 at 17:03:48 UTC, Johannes Pfau wrote:
> This explains why symbol visibility is useful. But do we really 
> need 'export'? Are there cases where public = export, 
> private/package = 'not exported' wouldn't work?

I want to sort of hijack export for my web apps. Say
you have

public Data getUserData(string userId, string key) {}

export Data getData(string key) {}

so other modules, internal to the app, are allowed
to replace the user id but still get the nice
function, but external api consumers can only get data
for the user they are logged in as.


More information about the Digitalmars-d mailing list