Named parameters

M

Mark McIntyre

What did bother me was that I kept seeing "off-topic" messages in the
newsgroup, yet no one has taken the effort to create a charter to put
into the FAQ.

There's no need - anyone reading this group would see all the "you're
off topic" postings, and should be able to divine the topic surely?
Seriously.
I think some people take a perverse joy in pointing out
the foibles of others, at least that's how it appears to a lurker.

Alternatively they consider it valuable to point people to the right
place.
What I really took exception with were the responses I got when I
pointed out that the topic of the newsgroup isn't as clear as it could
be. Some of those responses were very rude and condescending.

Ha!!! You've not been round here long have you? None of the responses
you got were very rude or condescending, believe me. When people are
rude to you here, you'll know. Boy will you know.
 
M

Mark McIntyre

Thank you for the sound advice. I won't continue to feed this
ungainly creation of mine... to paraphrase Tevya, "It is dead to me".

Just for your information., E Robert Tisdale is a widely despised
Troll, whose advice should be taken with a MASSIVE pinch of salt. Do
not trust anything he writes about C for instance.
 
I

Irrwahn Grausewitz

Great non-answer, you already pointed this out.

Let's look at the topic of the question:

"Has there been talk of adding named parameters to C?"

1) Not really a question about 'pure' standard (ISO) C. Right.

2) Not really a question about the C (ISO) standard. Wrong.

3) Not really a question about non-standard/implementation dependent
extensions.
Right.
So where does it go?
To c.s.c.
Even if there was a non-standard implementation
of this functionality, how would I know which newsgroup to ask it in,
should it have been posted in all of them? What if that particular
implentation doesn't have a newsgroup?
Ask in c.p or do a web-search.
This may come as a shock to you, but it's actually possible for a
question to apply to more than one newsgroup.
Then cross-post.
Technically, it's not a question about C so much as it is a question
about a discussion about C. Should that go to comp.lang.discussion.c?
Since there is no c.l.discussion.c, c.s.c is obviously the best place.
It's possible take pedantry too far.
It's possible to post to the most appropriate ng.

Regards
 
I

Irrwahn Grausewitz

Peter Pichler said:
But I must grudgingly agree with Adam: it is not really obvious from the
group's name. Not without hanging around for a few weeks and reading,
reading, reading... before first posting.

Which is the recommended practice, after reading the charter or welcome
message and the FAQ-list for the ng in question.

Regards
 
A

Adam Ruth

Chris Torek said:
On Fri, 31 Oct 2003 23:29:34 -0000, in comp.lang.c , "Peter Pichler"
["That which is topical in comp.lang.c"] is not really obvious
from the group's name.

Indeed, a short string of words and abbreviations (like "comp.lang.c"
or, to name two groups I do not read, "rec.arts.int-fiction" and
"soc.culture.magyar") is simply not *enough*.

Newsgroups should have posted charters. Having to divine the topic of
a newsgroup by reading tea leaves for a few weeks is a stupid idea.

The problem is never knowing when you've done it enough (1 week, 2
weeks, 6 months?). At least if there was a FAQ or charter you'd know
when you had enough information, and you'd never be in doubt. And
although I don't think "What's the topic of comp.lang.c?" is a very
frequently asked question, it certainly is a very frequently provided
answer! I think it's demonstrable that the extant information on the
topic is not sufficient, otherwise people wouldn't have to be told so
much.
In this particular case (asking about named parameters), I think it
can be topical on *both* groups. In comp.std.c one can ask whether
any future standard might include them, and whether there is any
existing work that can be referenced. In comp.lang.c one can ask
whether there is a way to at least "fake them" now -- and there is!

In particular, it is possible to obtain named parameters in C99.
You simply have to stop using ordinary function calls as if they
were ordinary function calls. Instead, pass your parameters as if
you were writing Mesa code: construct a "record" -- in C, called
a "struct" -- using the C99 "compound literal" syntax. Here is an
example function:

And that's where my wording got me. I have been thinking of using the
structure method, but I was hoping to hear if there was a better way,
but I didn't ask it correctly (ah, wonderful hindsight!). My thought
process was more along the lines of what you suggest, but I viewed it
as "adding it to C" because it's not part of the standard or any
implementation I know of.

Anyway, it's good to know that my method wasn't completely barking up
the wrong tree. It's still ugly (and maybe slow), but it's helpful
when you have several parameters all of the same type.
 
A

Adam Ruth

I can't speak for others, but for me it's usually five or ten minutes
at a time.

With a few people, preferably distributed between a few different time
zones, doing that, we can make it look like we have a lot more time than
we really do.


dave

Whatever smoke and mirrors you use, I'd like to say that we all
appreciate your efforts. I've found many a useful answer here.
 
D

Dan Pop

In said:
But I must grudgingly agree with Adam: it is not really obvious from the
group's name. Not without hanging around for a few weeks and reading,
reading, reading... before first posting.

It is obvious, once you ask yourself: what is the definition of the C
programming language?

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top