Attributed types

2007-04-21 Thread Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
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

Pike 7.6.112 beta

2007-04-21 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
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

Pike 7.6.112 beta

2007-04-21 Thread Peter Bortas @ Pike developers forum
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

Pike 7.6.112 beta

2007-04-21 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
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

Attributed types

2007-04-21 Thread Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
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

Re: Attributed types

2007-04-21 Thread Martin Bähr
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.