9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] I like this one
@ 2008-01-29 21:50 ron minnich
  2008-01-29 21:57 ` andrey mirtchovski
  0 siblings, 1 reply; 5+ messages in thread
From: ron minnich @ 2008-01-29 21:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

new w/gcc 4.3:
"- The |constructor| and |destructor| function attributes now accept
optional priority arguments which control the order in which the
constructor and destructor functions are run."

woo hoo! Now is that signed? What's the precision? 32 bits? Or can it
be floating point?

"I want priority 5! you get 6, dammit!"

"Just take 2pi as your priority. But I get e."

Sorry, more flame bait, but this is just too funny.

ron


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] I like this one
  2008-01-29 21:50 [9fans] I like this one ron minnich
@ 2008-01-29 21:57 ` andrey mirtchovski
  2008-01-29 22:11   ` Pietro Gagliardi
  0 siblings, 1 reply; 5+ messages in thread
From: andrey mirtchovski @ 2008-01-29 21:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

the optional argument is obviously a text description of the desired
priority level (e.g., "superbad!", or "not in a big hurry, care for a
spot of  tea?") accompanied by an optional justification in 150 words
or less.

support for interpretive dance descriptions to follow in the next release :p


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] I like this one
  2008-01-29 21:57 ` andrey mirtchovski
@ 2008-01-29 22:11   ` Pietro Gagliardi
  2008-01-29 22:29     ` Roman Shaposhnik
  0 siblings, 1 reply; 5+ messages in thread
From: Pietro Gagliardi @ 2008-01-29 22:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I don't get it... But why would you control how constructors are run?

On Jan 29, 2008, at 4:57 PM, andrey mirtchovski wrote:

> the optional argument is obviously a text description of the desired
> priority level (e.g., "superbad!", or "not in a big hurry, care for a
> spot of  tea?") accompanied by an optional justification in 150 words
> or less.
>
> support for interpretive dance descriptions to follow in the next  
> release :p


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] I like this one
  2008-01-29 22:11   ` Pietro Gagliardi
@ 2008-01-29 22:29     ` Roman Shaposhnik
  2008-01-29 22:58       ` Bakul Shah
  0 siblings, 1 reply; 5+ messages in thread
From: Roman Shaposhnik @ 2008-01-29 22:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, 2008-01-29 at 17:11 -0500, Pietro Gagliardi wrote:
> I don't get it... But why would you control how constructors are run?

  You don't unless you're totally worried about your job security and
would want to make maintenance of your code code virtually
impossible. ;-) C++ at least was smart enough not to promise anything
about the sequencing of constructors for global objects.

  Now, I can bet money that the reason they did it is for shared
libraries. And that opens up a whole new can of worms right there.

Thanks,
Roman.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] I like this one
  2008-01-29 22:29     ` Roman Shaposhnik
@ 2008-01-29 22:58       ` Bakul Shah
  0 siblings, 0 replies; 5+ messages in thread
From: Bakul Shah @ 2008-01-29 22:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, 29 Jan 2008 14:29:29 PST Roman Shaposhnik <rvs@sun.com>  wrote:
> On Tue, 2008-01-29 at 17:11 -0500, Pietro Gagliardi wrote:
> > I don't get it... But why would you control how constructors are run?

To give programmers enough rope and then some to hang
themselves?

>   You don't unless you're totally worried about your job security and
> would want to make maintenance of your code code virtually
> impossible. ;-) C++ at least was smart enough not to promise anything
> about the sequencing of constructors for global objects.
> 
>   Now, I can bet money that the reason they did it is for shared
> libraries. And that opens up a whole new can of worms right there.

I was very briefly exposed to stuff like the following (to be
compiled with Microsoft's C++ compiler).


#if	defined(_LIB)
#define XXX_API
#elif 	defined(_XXX_EXPORTS)
#define XXX_API __declspec(dllexport)
#else
#define XXX_API __declspec(dllimport)
#endif

class XXX_API foo {
	...
}

With stuff like this if you choose the wrong magic in your
Visual Studio project files, _bad_ things happen! I am still
having nightmares. I'd rather have a root canal treatment.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-29 22:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 21:50 [9fans] I like this one ron minnich
2008-01-29 21:57 ` andrey mirtchovski
2008-01-29 22:11   ` Pietro Gagliardi
2008-01-29 22:29     ` Roman Shaposhnik
2008-01-29 22:58       ` Bakul Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).