Dennis Luehring
whoami: Dennis Lühring, 24 years old, living in germany, ~6 years C++, ~3 years Pascal and derivates, ~2 years Assembler (x86,805x), Java... (~13 years in complete)
myinterrests: objectorientated software architektures/design, programming language design , ai games (www.aiforge.net)
myjob: working as an full time c++ developer in/for realtime/machine control stuff
what a like to see in D (or similar features)
User Defineable Attributes: maybe the 90%-perfect solution ( +/- the armount of your arguments ) for codegernerators
for example:
in my current job an codegenerator is used to "publish" methods through an command-pattern based plugin system... it use an empty #define statement as marker
looks like
define PUBLISHED
class Plugin {
public: void Function1(...) int Function2(...) PUBLISHED int Function3(...) PUBLISHED int m_nMaxCount pivate:}
but it needs an dirty #define-statement and i don't want to use special names like published_Function3 or something cause im using the function also as normal functions (and members)
with defineable attributes in D it could look like:
define attribute published
class Plugin {
public: void Function1(...) int Function2(...) published: int Function3(...) int m_nMaxCount pivate:}
and then i can use the D parser (or the type info of functions/methods) to build an amazing generator tool...
and maybe it should derivatebale
define attribute published: public or something
or replace attributes replace attribute in in const ...
or can i use aliases for this
contex sensitiv debugging
class Test{...}
Test a; debug Test b; Test c;
i will only see symbolic information for object b
ciao dennis
Messages
I'm not sure I understand the purpose of your proposed User Defineable Attributes, but I think you can effectively emulate them by making using of D's existing versioning features. It's a little more wordy than your proposal, but I think it'll work. I've provided an example below. -- JustinCalvarese
working is not the problem (i've got 4 working stiles ) the clean beautines of the solution is my problem DennisLuehring
version(myCodeGeneration) version = published;class Plugin { public: void Function1(...) int Function2(...) version(published) { int Function3(...) int m_nMaxCount } private:
}