As you all probably know, I've been tinkering with the type system in
Pike 7.7 for a while now, and I've now reached the point of
implementing attributed types.
The question once again is which syntax do you prefer?:
GCC-style:
void __attribute(noreturn) error(string msg);
string
Doesn't build cleanly; the newly compiled pike does not work when
building post modules:
Compiling /home/marcus/Pike-v7.6.112/src/post_modules/GL/top.c
/home/marcus/Pike-v7.6.112/build/sunos-5.10-sun4u/pike -DNOT_INSTALLED
-DPRECOMPILED_SEARCH_MORE
And that worked in the last beta? Works well enough on my cc-compiled
pike on bhelliom:
[EMAIL PROTECTED]:/tmp/Pike-v7.6.112/build/sunos-5.11-i86pc% ./pike
-mmaster.pike
Pike v7.6 release 112 running Hilfe v3.5 (Incremental Pike Frontend)
sizeof(indices(GL));
(1) Result: 1013
And that worked in the last beta?
Yes, although on closer inspection the difference is not in the dists,
but in my environment. I happened to have an UTF-8 locale set during
this build, and that caused the sed expressions that creates
master.pike to fail, since the ¤ used in the match pattern is
noreturn as attribute looks wrong to me. Consider:
void __attribute(noreturn) error(string msg)
int __attribute(noreturn) error(string msg)
For noreturn I would vote for a new keyword and do
noreturn error(string msg)
Otherwise I think I would favor method number two, but the way you show
it
can you explain what that allows us to do?
__attribute(...) looks like a function call.
what does it do? it returns a type?
do i define this function like any other and make it return types based
on runtime information.?
where would this be useful?
can you give an example?
greetings, martin.