473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Defining constants in classes

Joe
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
....
}
I hope it is clear what I am trying to do. In the member functions, I then
want to "fout.open(mScheduleFile)".
Is there way of doing this that actually works?

TIA,
Joe.
Jul 22 '05 #1
29 4601

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}


The language rules only permit in-class initialization of static const
members of integral type.

You can get the effect you're after with a static member function
returning a string or string literal, like so:

const std::string& schedule_file()
{
static const std::string file("schedule.txt");
return file;
}

or

const char* schedule_file()
{
static const char* file = "schedule.txt";
return file;
}
Jonathan
Jul 22 '05 #2
* "Jonathan Turkanis" <te******@kangaroologic.com> schriebt:

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}

The language rules only permit in-class initialization of static const
members of integral type.


Yes, but the OP asked why.

The answer to that seems to be "nobody knows why".

The language just turned out that way through historic accidents etc.

You can get the effect you're after with a static member function
returning a string or string literal, like so:

const std::string& schedule_file()
{
static const std::string file("schedule.txt");
return file;
}

or

const char* schedule_file()
{
static const char* file = "schedule.txt";
return file;
}


Or the constant can be defined in the class implementation file:
============ Schedule.hpp =============

#ifndef SCHEDULE_H
#include <string>

class Schedule
{
private:
static std::string const mScheduleFile;
};
#endif
============ Schedule.cpp =============

#include <Schedule.hpp>

std::string const Schedule::mScheduleFile = "schedule.txt";
Jul 22 '05 #3
Joe
Thanks for the quick reply. That works fine, but I can't help feeling it
makes things a a little "untidy".

Is that a standard solution to a standard problem?
Or am I going about the whole problem in an unusual/bad way?

Joe.
"Jonathan Turkanis" <te******@kangaroologic.com> wrote in message
news:c2*************@ID-216073.news.uni-berlin.de...

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}


The language rules only permit in-class initialization of static const
members of integral type.

You can get the effect you're after with a static member function
returning a string or string literal, like so:

const std::string& schedule_file()
{
static const std::string file("schedule.txt");
return file;
}

or

const char* schedule_file()
{
static const char* file = "schedule.txt";
return file;
}
Jonathan

Jul 22 '05 #4
Joe
"Joe" <an**@anon.com> wrote in message
news:Kn***************@newsfe1-gui.server.ntli.net...
Thanks for the quick reply. That works fine, but I can't help feeling it
makes things a a little "untidy".

Is that a standard solution to a standard problem?
Or am I going about the whole problem in an unusual/bad way?

Joe.
"Jonathan Turkanis" <te******@kangaroologic.com> wrote in message
news:c2*************@ID-216073.news.uni-berlin.de...

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}


The language rules only permit in-class initialization of static const
members of integral type.

You can get the effect you're after with a static member function
returning a string or string literal, like so:

const std::string& schedule_file()
{
static const std::string file("schedule.txt");
return file;
}

or

const char* schedule_file()
{
static const char* file = "schedule.txt";
return file;
}
Jonathan



Sorry for the top-post!!

(I have never understood why that is a big deal - it makes life so much
faster if you don't have to scroll, especially for a short post like this.
If anyone has a good reason for why people don't like it, can they tell me?
I will sleep better if I know)

Joe.
Jul 22 '05 #5
"Joe" <an**@anon.com> wrote in message
news:Kn***************@newsfe1-gui.server.ntli.net...
Thanks for the quick reply. That works fine, but I can't help feeling it makes things a a little "untidy".

Is that a standard solution to a standard problem?
Or am I going about the whole problem in an unusual/bad way?


It's one standard solution. Alf gave another one. I think they're both
a bit untidy.

I tend to use the one I showed you because I write a lot of
header-only libraries.

(I' not against top-posting, as such. I think it's like always driving
on the right or left side of the road; it doesn't matter as long as
everyone does the same thing. ;-) )

Jonathan
Jul 22 '05 #6
"Alf P. Steinbach" wrote:

* "Jonathan Turkanis" <te******@kangaroologic.com> schriebt:

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}


The language rules only permit in-class initialization of static const
members of integral type.


Yes, but the OP asked why.

The answer to that seems to be "nobody knows why".

The language just turned out that way through historic accidents etc.


The reason is that in-class initialization of static const members was
added in order to support their use as compile-time constants. Arrays of
char, floats, etc. can't be used as compile-time constants, so can't be
initialized in this way.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #7
Joe wrote:
Sorry for the top-post!!

(I have never understood why that is a big deal - it makes life so much
faster if you don't have to scroll, especially for a short post like this.
If anyone has a good reason for why people don't like it, can they tell me?
I will sleep better if I know)

Joe.


I agree 100%. I finally caved in, not because of the people that kept harping
on me, but because it is part of the newsgroup FAQ. Makes about as much sense
to me as arguing about indentation and brace placement... NNTP is definitely
an outdated protocol.
Jul 22 '05 #8
* Pete Becker <pe********@acm.org> schriebt:
"Alf P. Steinbach" wrote:

* "Jonathan Turkanis" <te******@kangaroologic.com> schriebt:

"Joe" <an**@anon.com> wrote in message
news:9Y****************@newsfe1-gui.server.ntli.net...
> This is a very basic question, but why can't I do the following ?
>
> class schedule {
>
> private:
> static const string mScheduleFile = "schedule.txt";
> ...
> }
>

The language rules only permit in-class initialization of static const
members of integral type.
Yes, but the OP asked why.

The answer to that seems to be "nobody knows why".

The language just turned out that way through historic accidents etc.


The reason is that in-class initialization of static const members was
added in order to support their use as compile-time constants.


Yes, the usefulness of compile-time constants was probably the reason
why they were allowed in this context.

Arrays of
char, floats, etc. can't be used as compile-time constants, so can't be
initialized in this way.


Nope, that does not explain why other constants are not allowed. I very
much doubt that GodAllah appeared in some committee meeting and declared
"Constants That Cannot Be Used As Compile Time Constants Are So Inherently
Evil That You Must Make Them More Difficult To Use". Instead, it seems
much more plausible that the committee used a heuristic on the lines of
"add only that which is absolutely critical, _or_ championed by VIP's".

Jul 22 '05 #9
"Alf P. Steinbach" wrote:

* Pete Becker <pe********@acm.org> schriebt:
"Alf P. Steinbach" wrote:

* "Jonathan Turkanis" <te******@kangaroologic.com> schriebt:
>
> "Joe" <an**@anon.com> wrote in message
> news:9Y****************@newsfe1-gui.server.ntli.net...
> > This is a very basic question, but why can't I do the following ?
> >
> > class schedule {
> >
> > private:
> > static const string mScheduleFile = "schedule.txt";
> > ...
> > }
> >
>
> The language rules only permit in-class initialization of static const
> members of integral type.

Yes, but the OP asked why.

The answer to that seems to be "nobody knows why".

The language just turned out that way through historic accidents etc.
The reason is that in-class initialization of static const members was
added in order to support their use as compile-time constants.


Yes, the usefulness of compile-time constants was probably the reason
why they were allowed in this context.


It's not probably the reason. It is the reason.
Arrays of
char, floats, etc. can't be used as compile-time constants, so can't be
initialized in this way.


Nope, that does not explain why other constants are not allowed. I very
much doubt that GodAllah appeared in some committee meeting and declared
"Constants That Cannot Be Used As Compile Time Constants Are So Inherently
Evil That You Must Make Them More Difficult To Use". Instead, it seems
much more plausible that the committee used a heuristic on the lines of
"add only that which is absolutely critical, _or_ championed by VIP's".


Phrase it however you like. Regardless, no historic [sic] accidents etc.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #10
In article <jt****************@newsfe1-gui.server.ntli.net>,
Joe <an**@anon.com> wrote:

[snippety snippety snip]
Sorry for the top-post!!

(I have never understood why that is a big deal - it makes life so much
faster if you don't have to scroll, especially for a short post like this.


It makes life so much faster for the people who read your postings if you
*delete* quoted material that isn't immediately relevant to your response.
Then people neither have to scroll through it, nor wait for it to
download. People who actually want to read the entire preceding posting
can usually fetch it easily from their news server. (for example, all I
have to do is hit the back-arrow key.)

--
Jon Bell <jt*******@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
Jul 22 '05 #11
* Pete Becker <pe********@acm.org> schriebt:
"Alf P. Steinbach" wrote:

* Pete Becker <pe********@acm.org> schriebt:
"Alf P. Steinbach" wrote:
>
> * "Jonathan Turkanis" <te******@kangaroologic.com> schriebt:
> >
> > "Joe" <an**@anon.com> wrote in message
> > news:9Y****************@newsfe1-gui.server.ntli.net...
> > > This is a very basic question, but why can't I do the following ?
> > >
> > > class schedule {
> > >
> > > private:
> > > static const string mScheduleFile = "schedule.txt";
> > > ...
> > > }
> > >
> >
> > The language rules only permit in-class initialization of static const
> > members of integral type.
>
> Yes, but the OP asked why.
>
> The answer to that seems to be "nobody knows why".
>
> The language just turned out that way through historic accidents etc.
>
>

The reason is that in-class initialization of static const members was
added in order to support their use as compile-time constants.


Yes, the usefulness of compile-time constants was probably the reason
why they were allowed in this context.


It's not probably the reason. It is the reason.
Arrays of
char, floats, etc. can't be used as compile-time constants, so can't be
initialized in this way.


Nope, that does not explain why other constants are not allowed. I very
much doubt that GodAllah appeared in some committee meeting and declared
"Constants That Cannot Be Used As Compile Time Constants Are So Inherently
Evil That You Must Make Them More Difficult To Use". Instead, it seems
much more plausible that the committee used a heuristic on the lines of
"add only that which is absolutely critical, _or_ championed by VIP's".


Phrase it however you like. Regardless, no historic [sic] accidents etc.


If you have any evidence that there was some informed, well-considered
decision to disallow e.g.
struct X
{
static double const = 1.23;
};

and

struct Y
{
static char const s[] = "disallowed for Very Good Reasons";
};

then I as well as the OP and many others would like to know the reason(s).

So spit it out, don't be shy, don't beat about the bush with incoherent
mumblings about "no historic [sic] accident" and so forth.

What, in your opinion or knowledge, makes a double value incredibly more
difficult or hazard-prone or whatever than e.g. a bool or int in struct X,
and what makes the compiler unable to translate the declaration in Y to

struct Z
{
static char const s[];
};

char const Z::s[] = "allowed for Very Good Reasons";

?

Jul 22 '05 #12
Joe wrote in news:9Y****************@newsfe1-gui.server.ntli.net:
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}
I hope it is clear what I am trying to do. In the member functions, I
then want to "fout.open(mScheduleFile)".
Is there way of doing this that actually works?


You might think you would saved some typeing if this was allowed,
but unless mScheduleFile is only used as a compile-time constant
(which is imposible, see Note below) you would also need a defenition:

struct X
{
/* declaration and initializer (not a defenition)
*/
static int const value = 10;
};

/* this is ok it compile-time usage
*/
char array[ X::value ];

/* This however requires a defenition for X::value
*/
int get_value()
{
return X::value;
}

/* A more obvious case
*/
int const &get_ref()
{
return X::value;
}

The defenition for X::value looks like this:

int const X::value;

and must (according to the Standard) appear in one and only one
translation unit (aka TU, usually a .cpp file).

Note that the only type of compile-time constant that C++ supports
are intergral ones, not float, char [], char * or std::string.

So for in class initialization of non-intergral constants to have
any value we first need to eliminate the language rule that requires
the out of class defenition.

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Jul 22 '05 #13
"Joe" <an**@anon.com> wrote:
(I have never understood why that is a big deal - it makes life so much
faster if you don't have to scroll, especially for a short post like this.
Normally, for short replies you need only a short context either. Thus,
there is not much scrolling needed anyway. The only reason to quote
something is to setup a context. Thus, why quote if you don't want people
to read it *before* reading your statements on the issue. There is a
signature around which actually brings it to the point quite well but I
don't have the exact wording. It goes something like this:

A: it makes reading things harder
Q: why is top posting bad?
If anyone has a good reason for why people don't like it, can they tell me?
I will sleep better if I know)


Well, if you top posted, you might actually sleep worse: excessive quoting
is a copyright infringement! Every article is covered by an implicit
copyright which protects the author's rights. Readers are allowed to read
things, make reasonable quotes (this is always allowed and cannot really
be prohibited as far as I know), and that's about it. Quoting texts entirely
or adding only minor own stuff to an article is generally prohibited. As is,
BTW, using any code posted in articles! Of course, more liberal copyrights
can be given at the author's discretion. I think the implicit copyright, ie.
the one given if the author does not state anything explicitly, is basically
as restrictive as a copyright can become. Note, that the copyright
legislation is international law. Also note that I'm not a lawyer: this is
what I understood from reading some stuff on copyright issues. However, I'm
pretty sure that at least the gist is right even if some details are wrong.

The issue of top-posting came up in a discussion amoung the moderators of
comp.lang.c++.moderated these days, too, although embedded into the bigger
context of overquotes. Our current policy is effectively to reject articles
on the basis of overquotes if the ratio between new material and quotes is
too bad and there seems to be no reason for that much quoting. The ratio is
an objective measure while the evaluation of whether the quoting is really
necessary is subjective, of course. Most rejections due to overquoting are
due to articles using top posting although we don't reject top posts per
se. I think there is a consensus amoung the moderators to continue rejecting
articles due to overquoting.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>
Jul 22 '05 #14
Joe wrote:
This is a very basic question, but why can't I do the following ?

class schedule {

private:
static const string mScheduleFile = "schedule.txt";
...
}

I hope it is clear what I am trying to do. In the member functions, I then
want to "fout.open(mScheduleFile)".
Is there way of doing this that actually works?


Yes.

class schedule {

private:
static const string mScheduleFile;
};

const string schedule::mScheduleFile("schedule.txt");

--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
Jul 22 '05 #15
> Well, if you top posted, you might actually sleep worse: excessive quoting
is a copyright infringement!
Never heard that one. I'd wait for a court ruling on that one, or at the very
least authoritive commentary from a copyright lawyer. I *HIGHLY* doubt that
there is any basis for copyright infringement as the OP should assume that
their comments are released into the public domain when posting to a public
forum. Again, my comments have just as much (or lack of) validity as yours --
the courts would have to rule on that one.
The issue of top-posting came up in a discussion amoung the moderators of
comp.lang.c++.moderated these days, too, although embedded into the bigger
context of overquotes. Our current policy is effectively to reject articles
on the basis of overquotes if the ratio between new material and quotes is
too bad and there seems to be no reason for that much quoting.


As I said previously, NNTP is an outdated (and severely insufficient)
protocol. It needs to be expanded to add new required features such as the
ability to separate replies from new comments, and that would allow newsreaders
the ability to let the user decide how previous comments would be displayed:
top, bottom, not at all... Unfortunately, we are stuck w/ what we have now,
and find that such trivial issues regarding posting are cause to limit the
valid dialog on a subject.
Jul 22 '05 #16
"Alf P. Steinbach" <al***@start.no> wrote
If you have any evidence that there was some informed, well-considered
decision to disallow e.g.
struct X
{
static double const = 1.23;
};

and

struct Y
{
static char const s[] = "disallowed for Very Good Reasons";
};

then I as well as the OP and many others would like to know the reason(s).


It's very simple: in what compilation unit would the variable 'Y::s' be stored?
If the variable is defined in the class definition, the compiler/linker have to
somehow collaborate to avoid redundant definitions. By forcing static data
members to be defined outside of the class, the decision falls on the programmer
and not on some extension of the linker.

One can argue that the problem is already being addressed for templates, but
there, it's a necessity. With static data members, it would amount to nothing
more than syntactic sugar.

Claudio Puviani
Jul 22 '05 #17
* Julie <ju***@aol.com> schriebt:
Well, if you top posted, you might actually sleep worse: excessive quoting
is a copyright infringement!


I *HIGHLY* doubt that there is any basis for copyright infringement


I agree. Here Dietmar seems to be a victim of group thinking within the
clc++m moderator cliche. But since those guys are generally intelligent ones
it is perhaps more plausible that this is meant as irony. Difficult to tell,
these days. We have to use the American way now: "Note: above is irony".
The issue of top-posting came up in a discussion amoung the moderators of
comp.lang.c++.moderated these days, too, although embedded into the bigger
context of overquotes. Our current policy is effectively to reject articles
on the basis of overquotes if the ratio between new material and quotes is
too bad and there seems to be no reason for that much quoting.


As I said previously, NNTP is an outdated (and severely insufficient)
protocol. It needs to be expanded to add new required features such as the
ability to separate replies from new comments, and that would allow newsreaders
the ability to let the user decide how previous comments would be displayed:
top, bottom, not at all... Unfortunately, we are stuck w/ what we have now,
and find that such trivial issues regarding posting are cause to limit the
valid dialog on a subject.


There is currently no way to infer automatically what the poster intends and
wants to convey to the reader.

Hence, it seems you've overstuffed yourself on Microsoft marketing, Julia.

I don't think it is a coincidence that you're both arguing for top-posting and
dragging in baby/manager-level Microsoft marketing -- for the "official"
definition of top-posting explicitly mentions Microsoft, idiot and newbie.

Jul 22 '05 #18
* "Claudio Puviani" <pu*****@hotmail.com> schriebt:
"Alf P. Steinbach" <al***@start.no> wrote
If you have any evidence that there was some informed, well-considered
decision to disallow e.g.
struct X
{
static double const = 1.23;
};

and

struct Y
{
static char const s[] = "disallowed for Very Good Reasons";
};

then I as well as the OP and many others would like to know the reason(s).
It's very simple: in what compilation unit would the variable 'Y::s' be stored?


As with other namespace-level constants like
const char s[] = "a constant";
If the variable is defined in the class definition, the compiler/linker have to
somehow collaborate to avoid redundant definitions.
That's somehow already the case for other constructs, including all
inline functions.

E.g., in

struct S
{
double x, y;

void mult( double s ){ x *= s; y *= s; }
};

the compiler and linker have to somehow collaborate on the definition of
function 'mult'.

Somehow that is not a problem at all.
By forcing static data
members to be defined outside of the class, the decision falls on the programmer
and not on some extension of the linker.
Do you think there was a decision to disallow certain constructs in
order to force the programmers to make decisions?

That, instead of the committee _not_ making a decision, they did make a
decision to force the programmers to have to make needless decisions?

I sincerely doubt that.

One can argue that the problem is already being addressed for templates, but
there, it's a necessity. With static data members, it would amount to nothing
more than syntactic sugar.


Do you think this would entail less efficient compilation and
linking, then?

Jul 22 '05 #19
Julie wrote:
Never heard that one. I'd wait for a court ruling on that one, or at the very
least authoritive commentary from a copyright lawyer. I *HIGHLY* doubt that
there is any basis for copyright infringement as the OP should assume that
their comments are released into the public domain when posting to a public
forum. Again, my comments have just as much (or lack of) validity as yours --
the courts would have to rule on that one.


That's not true at all. Where did you get such an idea? The only way to
have something enter the public domain is for the copyright to expire
(which takes a long time) or for the copyright holder to explicitly
place it into the public domain.

Brian Rodenborn
Jul 22 '05 #20
"Alf P. Steinbach" wrote:
Hence, it seems you've overstuffed yourself on Microsoft marketing, Julia.
Name's Julie.
I don't think it is a coincidence that you're both arguing for top-posting and
dragging in baby/manager-level Microsoft marketing
I'm not formally arguing for or against top posting -- I'm advocating that it
should be a user-definiable choice in reading, which is currently not supported
in the NNTP message format.
-- for the "official"
definition of top-posting explicitly mentions Microsoft, idiot and newbie.


Didn't know there was an official definition. I didn't realize that personal
preferences needed to be officially denigrated, but I guess that is a
consequence of intolerance.

No association w/ Microsoft.

If it is a universal law that all preferential top posters are idiots, then by
that law, I must be an idiot. Name calling, labels, etc. will not change my
preference, and honestly, I don't know what purpose it serves.

Good bye.
Jul 22 '05 #21
* Julie <ju***@aol.com> schriebt:

I'm not formally arguing for or against top posting.

If it is a universal law that all preferential top posters are idiots, then by
that law, I must be an idiot.


Jul 22 '05 #22
Julie wrote:
Well, if you top posted, you might actually sleep worse: excessive
quoting is a copyright infringement!
Never heard that one. I'd wait for a court ruling on that one, or at the
very least authoritive commentary from a copyright lawyer.


You are free to believe whatever you want! You might want to have a look
at <http://www.copyright.com/CopyrightResources/default.asp> although
you might, of course, consider the stuff there to be still part of a pun.
I *HIGHLY* doubt
that there is any basis for copyright infringement as the OP should assume
that their comments are released into the public domain when posting to a
public forum.
Well, have a look the above mentioned documents: essentially, everything
written here is protected by copyrights unless the author explicitly
puts the stuff into the public domain. Quoting everything and adding
just a minor statement does not fall under the "fair use" clause
mentioned there.
Again, my comments have just as much (or lack of) validity as
yours -- the courts would have to rule on that one.
Note, that this is in no way any kind of fun: although your above
statement is not really wrong, I'm positive that I'm much closer to the
mark than you are!
As I said previously, NNTP is an outdated (and severely insufficient)
protocol. It needs to be expanded to add new required features such as
the ability to separate replies from new comments, and that would allow
newsreaders the ability to let the user decide how previous comments would
be displayed:


Actually, I don't think that this is any sort of a protocol thing!
Quoting other's material is an act of authoring by itself. [Ab]Using
quotes in certain ways can provide quite a different context than the
whole quote or none at all could give and can convey rather different
meanings. Haven't you ever seen someone giving eg. an answer to a
question by just quoting the relevant portions of an article?
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>
Jul 22 '05 #23
Alf P. Steinbach wrote:
I agree. Here Dietmar seems to be a victim of group thinking within the
clc++m moderator cliche.
Not at all: as moderators we decided early on that we are not going
do anything about copyright infringements in articles we are
processing. That is, we don't do any kind of legal assessment to
decide whether we post or reject an article. We solely base our
decison on the content of the article.
But since those guys are generally intelligent ones
it is perhaps more plausible that this is meant as irony. Difficult to
tell, these days. We have to use the American way now: "Note: above is
irony".


No, it is not irony! This stuff is dead serious. Have a look at
<http://www.copyright.com/CopyrightResources/default.asp> for some basic
information (note, that although this page talks about the U.S.
constituition, U.S. Federal stuff, etc. the overall issue applies to all
nations which have ratified the Berner Convention). I think I came across
a bunch of documents written by lawyers and dealing specifically with
copyright legislation applied to UseNet:
- there are copyrights on all articles written (and it is actually not
even always clear to whome these belong: if the article is written
as part of normal work, the copyright might be owned by the author's
employer - thus be particularily careful when quoting someone from
SCO...)
- author's are bound to the "fair use" paragraph when quoting others
- ... and this is still no irony at all
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>
Jul 22 '05 #24
* Dietmar Kuehl <di***********@yahoo.com> schriebt:
Alf P. Steinbach wrote:
I agree. Here Dietmar seems to be a victim of group thinking within the
clc++m moderator cliche.
Not at all


Good to hear.
But since those guys are generally intelligent ones
it is perhaps more plausible that this is meant as irony. Difficult to
tell, these days. We have to use the American way now: "Note: above is
irony".


No, it is not irony!


Oooh, bad. Bad.

This stuff is dead serious. Have a look at
<http://www.copyright.com/CopyrightResources/default.asp> for some basic
information (note, that although this page talks about the U.S.
constituition, U.S. Federal stuff, etc. the overall issue applies to all
nations which have ratified the Berner Convention).


No thanks, and no need.

As a practical matter we can just wait till someone's been convicted in
court for copyright infringement or whatever, due to Usenet article quoting.

And as a service to society at large we _should_ do that, and perhaps more.

Being afraid of lawyers' abuse of the courts is a sickness that has infested
modern Western society. For example, in one case the relatives of a British
base jumper (who couldn't wait till he was resqued but decided to see whether
the law of gravity had perhaps been cancelled) who marooned himself halfway up
a Norwegian mountain, sued the voluntary, unpaid resquers from Red Cross etc.
We should not be afraid to help people just because they might sue us for not
helping enough, or perhaps for not taking the cost of sending up a helicopter
with a megaphone shouting "don't jump half a kilometer down you idiot, it'll
kill you!"; we shouldn't be afraid to quote anything we want on the Usenet.

I'm glad to hear that clc++m moderators decided against succumbing to the
sickness, and I'm sad to see arguments here that one should perhaps, for
one's own good presumably (certainly not other's good), decide to be sick.

Jul 22 '05 #25
Julie wrote:
(I have never understood why [top posting] is a big deal - it makes
life so much faster if you don't have to scroll, especially for a
short post like this.


I agree 100%.


Make that two.

And, as you point out, it's pointless to argue against those who
are against top posting--let alone argue in *favor* of it.

But given that people increasingly don't edit well, I very much
prefer seeing new content at top where I can quickly determine if
the post is worth reading in detail. When I pull up a message and
all I see are quotes.... I usually pull up the NEXT message!

--
|_ CJSonnack <Ch***@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
|_____________________________________________|___ ____________________|
Jul 22 '05 #26
"Alf P. Steinbach" wrote:

If you have any evidence that there was some informed, well-considered
decision to disallow e.g.


I was there. You weren't. I gave you the explanation. Sorry you don't
like it.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #27
* Pete Becker <pe********@acm.org> schriebt:
"Alf P. Steinbach" wrote:

If you have any evidence that there was some informed, well-considered
decision to disallow e.g.


I was there. You weren't. I gave you the explanation. Sorry you don't
like it.


It's not that I don't like, it's that it amounted to just a "because";
saying that only compile time constants deserve to be allowed because
only they deserve to be allowed, as you did, is a bit circular.

So what _were_ the reasons?

Or, what was _one_ reason?

Jul 22 '05 #28
* di***********@yahoo.com (Dietmar Kuehl) schriebt:

There is a signature around which actually brings it to the point
quite well but I don't have the exact wording.


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 22 '05 #29
Dietmar Kuehl wrote:

<snip>
There is a
There are several versions actually.
signature around which actually brings it to the point quite well but I
don't have the exact wording.

<snip>

--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
Jul 22 '05 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christian Hackl | last post by:
I honestly wasn't able to find an answer for this design question using Google and Google Groups, so I apologize if it is asked too frequently :) Anyway: Let's say I have a multidimensional array...
2
by: Sriram Chadalavada | last post by:
Hello everyone, I am a newbie to Python with experience in C programming. For my project, I am re-writing C routines as Python functions. I am currently using raw numerical values and was...
38
by: Ted | last post by:
Is there a way to define a constant value for a color in a CSS declaration? I have numerous colors in different CSS elements, and if I make a change in color, I have to change all the reference...
11
by: Bill Nguyen | last post by:
I need to make a set of constants to be available for the whole application. Public const is confined to the form from which constants are declared. Is there a way to declare once and all forms can...
6
by: PC | last post by:
Gentlesofts, Forgive me. I'm an abject newbie in your world, using VB 2005 with the dot-Net wonderfulness. So, I'm writing a wonderful class or two to interface with a solemnly ancient...
6
by: alan | last post by:
I'm creating a sort-of "wrapper" class which (partly) acts like a variable. Something like: template<class t> class cell{ t curval; public: /*public for debugging only - will be private in...
3
by: boris | last post by:
Hi. If somebody can help out with this design question, thank you very much. Suppose I have a global constant, like an images directory. This constant will be referenced from multiple classes. How...
12
by: Gordon | last post by:
I want to provide a set of static functions in a superclass that work with class constants defined in a decendant of that class. Unfortunately I've run into a snag with this idea. Example: ...
54
by: shuisheng | last post by:
Dear All, I am always confused in using constants in multiple files. For global constants, I got some clues from http://msdn.microsoft.com/en-us/library/0d45ty2d(VS.80).aspx So in header...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.