473,387 Members | 1,464 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,387 software developers and data experts.

C Syntax

Why is C syntax so uneasy on the eye?

In its day, was it _really_ designed by snobby programmers to scare away
potential "n00bs"? If so, and after 50+ years of programming research,
why are programming languages still being designed with C's syntax?

These questions drive me insane. Every waking minute...
Nov 16 '05 #1
107 4820
Why is Chinese syntax so uneasy on the eye?

In its day, was it _really_ designed by snobby linguists to scare away
potential "n00bs"? If so, and after 5000+ years of civilization,
why do Chinese people still using that funny syntax?

These questions drive me insane. Every waking minute...
Nov 16 '05 #2
C# Learner wrote:
Why is C syntax so uneasy on the eye?

In its day, was it _really_ designed by snobby programmers to scare away
potential "n00bs"? If so, and after 50+ years of programming research,
why are programming languages still being designed with C's syntax?

These questions drive me insane. Every waking minute...


If you want COBOL, you know where to find it.

--
Er*********@sun.com

Nov 16 '05 #3
C# Learner <cs****@learner.here> wrote in
news:uL**************@TK2MSFTNGP11.phx.gbl:
These questions drive me insane. Every waking minute...


I would sleep more often then.

--
- Mark ->
--
Nov 16 '05 #4
C# Learner wrote:
Why is C syntax so uneasy on the eye?


Because it's so pretty. That it is "uneasy on [your] eye" is your
problem. Not to worry; there's a solution for your problem. Jesus said
it, and it appears three times in the Gospels:

Matthew 5:29 And if thy right eye offend thee, pluck it out, and cast
it from thee: for it is profitable for thee that one of thy members
should perish, and not that thy whole body should be cast into hell.

Matthew 18:9 And if thine eye offend thee, pluck it out, and cast it
from thee: it is better for thee to enter into life with one eye, rather
than having two eyes to be cast into hell fire.

Mark 9:47 And if thine eye offend thee, pluck it out: it is better for
thee to enter into the kingdom of God with one eye, than having two eyes
to be cast into hell fire:

Nov 16 '05 #5
C# Learner wrote:

Why is C syntax so uneasy on the eye?

In its day, was it _really_ designed by snobby programmers to scare away
potential "n00bs"? If so, and after 50+ years of programming research,
why are programming languages still being designed with C's syntax?

These questions drive me insane. Every waking minute...


Go troll somebody else.

*plonk*


Brian Rodenborn
Nov 16 '05 #6
Alex Moskalyuk wrote:
Why is Chinese syntax so uneasy on the eye?


<snip>

You make a perfectly valid counter-argument.

I think we can conclude, then, that humans, in general, are a pretty
/stupid/ species. Note that this is /not/ a shallow thought.

Another example showing human stupidity, which is also related to
natural languages, is the fact that there are /so many/ natural
languages spoken by humans. Of cource, more than one natural language
is redundant, and causes problems involved with translation.

By the way, it's nice to see someone actually being able to provide a
decent counter-argument on a newsgroup without having to resort to
name-calling.
Nov 16 '05 #7
Have you ever looked into Perl or Lisp code?

C suddenly starts making perfect sense.

What's uneasy to you? Curly braces, parentheses, keywords, or something
else?
--
Alex Moskalyuk
_____________________________
http://www.techinterviews.com

"C# Learner" <cs****@learner.here> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
Alex Moskalyuk wrote:
Why is Chinese syntax so uneasy on the eye?


<snip>

You make a perfectly valid counter-argument.

I think we can conclude, then, that humans, in general, are a pretty
/stupid/ species. Note that this is /not/ a shallow thought.

Another example showing human stupidity, which is also related to
natural languages, is the fact that there are /so many/ natural
languages spoken by humans. Of cource, more than one natural language
is redundant, and causes problems involved with translation.

By the way, it's nice to see someone actually being able to provide a
decent counter-argument on a newsgroup without having to resort to
name-calling.

Nov 16 '05 #8
C# Learner <cs****@learner.here> writes:
By the way, it's nice to see someone actually being able to provide a
decent counter-argument on a newsgroup without having to resort to
name-calling.


While your original flamebait wasn't particularly an example of decency
on your part, at least have the decency to stop posting off-topic *now*,
please.

If you really believe that the intention of Alex' reply was to start
an elaborate discussion about the Chinese language in comp.lang.c,
I recommend that you stay off Usenet until you have learned to pick up
hints.

Off-topic, therefore Followup-To: poster.

Martin
--
,--. Martin Dickopp, Dresden, Germany ,= ,-_-. =.
/ ,- ) http://www.zero-based.org/ ((_/)o o(\_))
\ `-' `-'(. .)`-'
`-. Debian, a variant of the GNU operating system. \_/
Nov 16 '05 #9
Alex Moskalyuk wrote:
Have you ever looked into Perl or Lisp code?

C suddenly starts making perfect sense.

What's uneasy to you? Curly braces, parentheses, keywords, or something
else?


One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.

Here's a very simple example:

void Foo
{
if (FooBar(Parse(Process(GetInput())))
DoSomething();
}

Imagine if, instead, we could write the following:

void Foo
{
if FooBar(Parse(Process(GetInput())):
DoSomething();
}

Python uses such a construct for test conditions.

Another nicety about Python is the fact that whitespace is used for
defining code blocks. This makes code much clearer than the equivalent
C code, which requires block being/end markers.

Here's a very simple Python code sample:
http://www.kernelthread.com/hanoi/html/py.html .

Try staring at it for one minute.

After having done so, take a look at this:
http://www.kernelthread.com/hanoi/html/c.html .

Even if one's accustomed to C syntax, the former is still clearer and
easier-to-read, don't you think?

Every time I see code that conforms to C's basic syntax, I cringe; yet I
write such code every day.

Why C? Why?!
Nov 16 '05 #10
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Sosman wrote:
| C# Learner wrote:
|
|> Why is C syntax so uneasy on the eye?
|>
|> In its day, was it _really_ designed by snobby programmers to scare
|> away potential "n00bs"? If so, and after 50+ years of programming
|> research, why are programming languages still being designed with C's
|> syntax?
|>
|> These questions drive me insane. Every waking minute...
|
|
| If you want COBOL, you know where to find it.
|

I resemble that remark! :-)

FWIW, if you want a computer language that's really "uneasy on the eye", try
APL or RPG2. Even Lisp isn't very easy to read.

OTOH, I've had to read through pages of Java recently (analysis and design of
a new web component for my corporate masters, requiring review of our current
j2ee web apps), and if Java is the new "readability", then give me C any day.
Worse spaghetti code than you could find in any assembly program. I have no
doubt that C# and C++ are just as bad.


- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAtS6VagVFX4UWr64RAi+RAKCnP8xUHTt6WJpucgZ6Aq 6E1fmMoQCgndgX
eofd4o3IJyR9thmZlRXZwPg=
=PX6r
-----END PGP SIGNATURE-----
Nov 16 '05 #11
As a long time programmer of many languages I've always found the explicit
statement bounding in C to be quite nice. For me it improves readability as
my seasoned internal tokenizer is capable of finding code blocks more quickly
by using the braces and parenthesis than by scanning whitespace. Whitespace
also breaks down quite fast when you start using non fixed width fonts and
mixing tabs and spaces. Arguably you could say, don't do that, but at least
with something of the nature of C and it's explit block scoping you can easily
write a pretty printer and avoid any ambiguity that would otherwise exist.

Take the following excerpt from a Python tutorial:
Tuple syntax

From a syntax viewpoint, you create a tuple by placing a sequence of items
inside a pair of enclosing parentheses and separating them by commas. Note that
the parentheses can be omitted when such omission will not lead to ambiguity.

Note that they point out you can leave out parens only when it won't lead to
ambiguity. C doesn't make that mistake. They make sure there is no ambiguity,
and if you leave out a parens it doesn't make the statement ambiguous, it makes
it
a different or erroneous statement altogether.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"C# Learner" <cs****@learner.here> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
Alex Moskalyuk wrote:
Have you ever looked into Perl or Lisp code?

C suddenly starts making perfect sense.

What's uneasy to you? Curly braces, parentheses, keywords, or something
else?


One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.

Here's a very simple example:

void Foo
{
if (FooBar(Parse(Process(GetInput())))
DoSomething();
}

Imagine if, instead, we could write the following:

void Foo
{
if FooBar(Parse(Process(GetInput())):
DoSomething();
}

Python uses such a construct for test conditions.

Another nicety about Python is the fact that whitespace is used for
defining code blocks. This makes code much clearer than the equivalent
C code, which requires block being/end markers.

Here's a very simple Python code sample:
http://www.kernelthread.com/hanoi/html/py.html .

Try staring at it for one minute.

After having done so, take a look at this:
http://www.kernelthread.com/hanoi/html/c.html .

Even if one's accustomed to C syntax, the former is still clearer and
easier-to-read, don't you think?

Every time I see code that conforms to C's basic syntax, I cringe; yet I
write such code every day.

Why C? Why?!

Nov 16 '05 #12
["Followup-To:" to to microsoft.public.dotnet.languages.csharp]

Martin Dickopp wrote:
C# Learner <cs****@learner.here> writes:
By the way, it's nice to see someone actually being able to provide a
decent counter-argument on a newsgroup without having to resort to
name-calling.
While your original flamebait


My intention was /not/ to start a flame war, but to start a healthy
discussion on the subject of C and why its basic syntax is present in so
many modern programming languages.

If I had asked that question simply and directly, I doubt that many
would've given it a second thought. This is unfortunate detail to keep
in mind when posting to USENET, or other such Internet forums. There
needs to be a little spice to get a discussion going. This is what was
provided by myself in my thread-starter.
wasn't particularly an example of decency
on your part, at least have the decency to stop posting off-topic *now*,
please.
Oh, now that Martin's joined the fray, we're no longer allowed to
continue a discussion which has a sub-thread which is /ever so slightly/
off-topic. Hmph.
If you really believe that the intention of Alex' reply was to start
an elaborate discussion about the Chinese language in comp.lang.c,
Please take the time to /read/ the messages you're replying to. My
reply only just touches on the subject of the Chinese language. My
intention was /not/ to start an elaborate discussion about the Chinese
language.
I recommend that you stay off Usenet until you have learned to pick up
hints.
http://www.winternet.com/~mikelr/flame12.html
Off-topic, therefore Followup-To: poster.


I have no intention to e-mail my reply directly to you, so I disregarded
that follow-up. From the tone of your reply, it seems that had I given
you my e-mail address, I'd be harassed!

I've set follow-ups to microsoft.public.dotnet.languages.csharp, since
people in there are cool. However, my experience has shown that the
people in comp.lang.c, on the other hand, are a bunch of snobby a*******s!

I've posted in that group before and I got flamed in reply almost every
time. I also lurk in that group and notice that even regulars get
/regularly/ flamed there, for little or no reason.

Yeah, yeah, call me a troll. Whatever. This is my opinion, and you
asked for it by /flaming/ me.

Anyway, as I said, I'm not going to e-mail you, and may well proceed to
plonk you due to your heavy-handedness and your apparent snobby attitude.

Goodbye.
Nov 16 '05 #13
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

C# Learner wrote:
| Why is C syntax so uneasy on the eye?

I would disagree with that assertion; I do not find C syntax "uneasy on the eye".

| In its day, was it _really_ designed by snobby programmers to scare away
| potential "n00bs"?

"It's day" is hardly over, and the designers of C had other things on their
minds than attempting to scare away neophytes.

| If so, and after 50+ years of programming research,
| why are programming languages still being designed with C's syntax?

Perhaps because it works?

| These questions drive me insane. Every waking minute...

These are trivialities. Learn five or six computer languages (or three or four
that are entirely unrelated to each other), /then/ formulate your opinion.

Just remember, the computer doesn't care what language the program is written
in; it's all machine language to the CPU. Computer 'language' is for /human/
consumption, and is designed to meet the needs of the programmer and his/her
environment. Some languages are exceedingly suscinct (i.e. APL or RPG), and
some are very verbose (i.e. COBOL, SNOBOL, PL/I, Assembly (any processor)).
Some languages are procedural, some are OO, some are list processors, some are
macro languages. Learn a few, see what they do and where they are used.

Only then can you conduct a reasonable conversation on the topic.

- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAtTl+agVFX4UWr64RAntoAJ9pk9dL4gzdc9Vk56pcID MtV7yj4gCfY7k0
sTaxl6obapbLPdS7z9Hy6HI=
=jJJD
-----END PGP SIGNATURE-----
Nov 16 '05 #14
Lew Pitcher wrote:

[...]
| In its day, was it _really_ designed by snobby programmers to scare away
| potential "n00bs"?

"It's day" is hardly over, and the designers of C had other things on their
minds than attempting to scare away neophytes.
By "its day" ("it's day" is grammatically incorrect, by the way), I
actually meant the days around which it was designed. I phrased it
incorrectly -- my mistake.

[...]
| These questions drive me insane. Every waking minute...

These are trivialities. Learn five or six computer languages (or three
or four
that are entirely unrelated to each other), /then/ formulate your opinion.
Well, I have learned BASIC, C-like languages (C and C++), Delphi
(formerly named 'Object Pascal') and Smalltalk.

So, basically, I've learned a couple of procedural languages, and a
couple of OO ones.
Just remember, the computer doesn't care what language the program is
written
in; it's all machine language to the CPU. Computer 'language' is for
/human/
consumption, and is designed to meet the needs of the programmer and
his/her
environment.
Exactly -- and this is why I see high-level language syntax to be so
important.

I feel that popular, modern-day high-level languages are tainted by a
specific syntax that has carried over through decades, one which I feel
is somewhat inhibitive. I feel it's inhibitive in the sense that code
written in it needs to conform to a syntax that could be nicer, and make
for easier-to-read source code.
Some languages are exceedingly suscinct (i.e. APL or RPG), and
some are very verbose (i.e. COBOL, SNOBOL, PL/I, Assembly (any processor)).
Some languages are procedural, some are OO, some are list processors,
some are
macro languages. Learn a few, see what they do and where they are used.

Only then can you conduct a reasonable conversation on the topic.


I don't understand why I'd need to learn a few more languages to
understand that C's basic syntax could be nicer.
Nov 16 '05 #15
"C# Learner" <cs****@learner.here> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
Alex Moskalyuk wrote:
Have you ever looked into Perl or Lisp code?

C suddenly starts making perfect sense.

What's uneasy to you? Curly braces, parentheses, keywords, or something
else?
One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.


I think you confuse a flaw with part of the language specification.

Here's a very simple example:

void Foo
{
if (FooBar(Parse(Process(GetInput())))
DoSomething();
}

Imagine if, instead, we could write the following:

void Foo
{
if FooBar(Parse(Process(GetInput())):
DoSomething();
}

I'm imagining, and I'm reminded of BASIC.
Python uses such a construct for test conditions.

Another nicety about Python is the fact that whitespace is used for
defining code blocks. This makes code much clearer than the equivalent
C code, which requires block being/end markers.

Here's a very simple Python code sample:
http://www.kernelthread.com/hanoi/html/py.html .

Try staring at it for one minute.

Have just done so, this code (admittedly having never even looked at Python
before) seems completely unreadable to me. Maybe I'm just used to C syntax.
After having done so, take a look at this:
http://www.kernelthread.com/hanoi/html/c.html .

Even if one's accustomed to C syntax, the former is still clearer and
easier-to-read, don't you think?
No, not really. Python may be easier for you because that may be what you're
used to looking at, but C and PHP are what I do (PHP's syntax is more
similar to C's than Python's) and their syntax makes perfect sense to me. It
seems to me there may not be a "better" way; just different ways - although
it does seem to me that Python code would be prone to breaking when cnped
between things which do not preserve tab formatting for example (such as
some newsreaders).

One of the things I like about C is that whitespace most often doesn't
matter and I can control exactly how I want my program to look and read
rather than have it laid out for me by the language specification.

Every time I see code that conforms to C's basic syntax, I cringe; yet I
write such code every day.

Why C? Why?!


This is the kind of question which could easily attract a lot of annoyance.
Obviously this entire post is off-topic. Python is not C, C will never be
Python and you've cross-posted to C# which is not C either.

Nov 16 '05 #16
On Wed, 26 May 2004 19:56:05 -0400, Lew Pitcher
<lp******@sympatico.ca> wrote in comp.lang.c:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Sosman wrote:
| C# Learner wrote:
|
|> Why is C syntax so uneasy on the eye?
|>
|> In its day, was it _really_ designed by snobby programmers to scare
|> away potential "n00bs"? If so, and after 50+ years of programming
|> research, why are programming languages still being designed with C's
|> syntax?
|>
|> These questions drive me insane. Every waking minute...
|
|
| If you want COBOL, you know where to find it.
|

I resemble that remark! :-)

FWIW, if you want a computer language that's really "uneasy on the eye", try
APL or RPG2. Even Lisp isn't very easy to read.
You haven't liven until you've seen badly written PL/M (note the 'M').

Their equivalent of C's switch...case still gives me nightmares after
all these years.
OTOH, I've had to read through pages of Java recently (analysis and design of
a new web component for my corporate masters, requiring review of our current
j2ee web apps), and if Java is the new "readability", then give me C any day.
Worse spaghetti code than you could find in any assembly program. I have no
doubt that C# and C++ are just as bad.


--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 16 '05 #17
Kieran Simkin wrote:
"C# Learner" <cs****@learner.here> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
[...]
After having done so, take a look at this:
http://www.kernelthread.com/hanoi/html/c.html .

Even if one's accustomed to C syntax, the former is still clearer and
easier-to-read, don't you think?


No, not really. Python may be easier for you because that may be what you're
used to looking at,


Aha, but I only saw Python code for the /first/ time yesterday. :-)
but C and PHP are what I do (PHP's syntax is more
similar to C's than Python's)
Cool.
[...]
Every time I see code that conforms to C's basic syntax, I cringe; yet I
write such code every day.

Why C? Why?!
This is the kind of question which could easily attract a lot of annoyance.


Okay, I accept that. I don't mean to annoy -- it's just my style of
writing. If I've annoyed then I apologize to all those affected.

Also, I guess I'm just trying to make a point and get heard here; and,
at the same time, I want to hear what those who are more experienced
than me have to say on the matter -- especially C gurus!

For the record, I don't /hate/ this C syntax of which I talk. I just
have a feeling of disbelief, perhaps, that some badly-implemented (in my
opinion) syntactial elements of the C language have passed through to
modern programming languages.
Obviously this entire post is off-topic. Python is not C, C will never be
Python and you've cross-posted to C# which is not C either.


Hmm... I have to disagree. I feel that this discussion is about C's
basic syntax and its ubiquity in popular modern-day languages.

If such a discussion is off-topic for comp.lang.c, then I honestly don't
know quite where it would be /on/-topic. In fact, I even considered
renaming the subject of this post to 'Re: C Syntax', but didn't want to
enrage people by doing so.

In any case, this was also posted to
microsoft.public.dotnet.languages.csharp since I wanted to hear some
opinions from those people too, and that is also the group which I read
more.
Nov 16 '05 #18
"C# Learner" <cs****@learner.here> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.
Without the parens you would need a "then" keyword of some kind. It seems
like an even trade.
Another nicety about Python is the fact that whitespace is used for
defining code blocks. This makes code much clearer than the equivalent
C code, which requires block being/end markers.
OTOH, C not using whitespace to mean anything gives programmers lots of
flexibility in how they format their source code to improve readability.

Block begin/end markers are very useful, and having such things explicit
arguably makes things easier for both the compiler and subsequent coders.
Here's a very simple Python code sample:
http://www.kernelthread.com/hanoi/html/py.html .

Try staring at it for one minute.

After having done so, take a look at this:
http://www.kernelthread.com/hanoi/html/c.html .

Even if one's accustomed to C syntax, the former is still clearer and
easier-to-read, don't you think?


That depends on the reader; the C version is far clearer to me. You also
put error-checking into the C version that's not in the Python one, which is
unfair when considering code length.

S

--
Stephen Sprunk "Stupid people surround themselves with smart
CCIE #3723 people. Smart people surround themselves with
K5SSS smart people who disagree with them." --Aaron Sorkin

Nov 16 '05 #19
"C# Learner" <cs****@learner.here> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
These are trivialities. Learn five or six computer languages (or three
or four
that are entirely unrelated to each other), /then/ formulate your opinion.

Well, I have learned BASIC, C-like languages (C and C++), Delphi
(formerly named 'Object Pascal') and Smalltalk.

So, basically, I've learned a couple of procedural languages, and a
couple of OO ones.


And which one do seems you the best?
Which one seems to have the best syntax?

All your languages are Algol-derivative, so they share equivalent
syntactic constructs and all them are similar.

Try to learn something truly alternative. Try FORTRAN 77, the language
without any flame wars about indentation. Try LISP, the language with
syntax based on two symbols. Then come back.

When personally I met C, I already knew BASIC and Pascal and I was amused
by the expressiveness and brevity of C's syntax. I still think that
for (i=0;i<10;i++) {...}
is much better than
for i:=0 to 9 do begin ... end;
Some languages are exceedingly suscinct (i.e. APL or RPG), and
some are very verbose (i.e. COBOL, SNOBOL, PL/I, Assembly (any processor)). Some languages are procedural, some are OO, some are list processors,
some are
macro languages. Learn a few, see what they do and where they are used.

Only then can you conduct a reasonable conversation on the topic.


I don't understand why I'd need to learn a few more languages to
understand that C's basic syntax could be nicer.


Suggest some improvements and I'll say you, why you're wrong ;-)

Nov 16 '05 #20
[I'll do the courtesy of a reply at the risk of getting flamed by the
comp.lang.c police.]

I. Appel wrote:
"C# Learner" <cs****@learner.here> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
These are trivialities. Learn five or six computer languages (or three
or four
that are entirely unrelated to each other), /then/ formulate your
opinion.
Well, I have learned BASIC, C-like languages (C and C++), Delphi
(formerly named 'Object Pascal') and Smalltalk.

So, basically, I've learned a couple of procedural languages, and a
couple of OO ones.


And which one do seems you the best?
Which one seems to have the best syntax?


I'd say Delphi has the clearest syntax.

[...]
I don't understand why I'd need to learn a few more languages to
understand that C's basic syntax could be nicer.


Suggest some improvements and I'll say you, why you're wrong ;-)


Simply:

1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.

2) Remove begin/end code block markers and require indentation instead.
Nov 16 '05 #21
C# Learner <cs****@learner.here> wrote:
[I'll do the courtesy of a reply at the risk of getting flamed by the
comp.lang.c police.]
[No police around, only conscious people.]
I. Appel wrote:
"C# Learner" <cs****@learner.here> wrote: <snip>
Well, I have learned BASIC, C-like languages (C and C++), Delphi
(formerly named 'Object Pascal') and Smalltalk.

So, basically, I've learned a couple of procedural languages, and a
couple of OO ones. <snip>

Note:
"Procedural" and "OO" are not mutually exclusive language concepts.
Smalltalk is a functional language.
I don't understand why I'd need to learn a few more languages to
understand that C's basic syntax could be nicer.


Suggest some improvements and I'll say you, why you're wrong ;-)


Simply:

1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.

2) Remove begin/end code block markers and require indentation instead.


Who or what is keeping you from designing a language incorporating the
worst of BASIC/Pascal/Python/FORTRAN/etc. worlds? Not that it will
ever have a fighting chance to be used by anyone for anything but as
an example of a language with a syntax "uneasy to the eye".

"Doctor, it hurts when I look at C."
"Well, then don't."

Regards
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
clc OT guide : http://benpfaff.org/writings/clc/off-topic.html
Nov 16 '05 #22
C# Learner <cs****@learner.here> wrote:
Why is C syntax so uneasy on the eye?


Beware the troll! This is cross-posted inappropriately.

Richard
Nov 16 '05 #23
"Justin Rogers" <Ju****@games4dotnet.com> wrote:
Note that they point out you can leave out parens only when it won't lead to
ambiguity. C doesn't make that mistake. They make sure there is no
ambiguity, and if you leave out a parens it doesn't make the statement
ambiguous, it makes it a different or erroneous statement altogether.


C has plenty of ambiguity:

- Braces are optional if there is only one statement for if() or for() or
while(). (But not for do ... while(), switch, or structure/union
declarations.)

- If a statement has multiple side effects, the order in which those side
effects take place can be unknown.

- The right shift operator may or may not sign extend signed integers. Its
implementation defined.

- The size of an integer is platforms specific.

- The number of bits in a bytes is platform specific.

- Try this one on for size:

char a = -1, b = -2;
unsigned short x = (1 > 0) ? a : b;

printf ("x = %d\n", x);

What do you think is printed out? Explain it.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Nov 16 '05 #24
Paul Hsieh wrote:
"Justin Rogers" <Ju****@games4dotnet.com> wrote:
Note that they point out you can leave out parens only when it won't lead to
ambiguity. C doesn't make that mistake. They make sure there is no
ambiguity, and if you leave out a parens it doesn't make the statement
ambiguous, it makes it a different or erroneous statement altogether.


C has plenty of ambiguity:

- Braces are optional if there is only one statement for if() or for() or
while(). (But not for do ... while(), switch, or structure/union
declarations.)


The braces are also optional on switch and do-while statements:

do something(); while (not_finished());

switch (expression)
statement;

Struct or union declarations are not relevant: their components are
declarations, not statements.

None of your other examples were syntactically ambiguous.

Jeremy.
Nov 16 '05 #25
In <uL**************@TK2MSFTNGP11.phx.gbl> C# Learner <cs****@learner.here> writes:
Why is C syntax so uneasy on the eye?


Uneasiness is in the eye of the beholder...

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 16 '05 #26
C# Learner wrote:
Simply:

1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.


#define if if (
#define then )

int main(int argc, char **argv)
{
if argc-1 == 0 then return 666;
return 0;
}

Nov 16 '05 #27

In article <V7********************@news20.bellglobal.com>, Lew Pitcher <lp******@sympatico.ca> writes:

FWIW, if you want a computer language that's really "uneasy on the eye", try
APL or RPG2. Even Lisp isn't very easy to read.
APL?!! APL is beauty itself, manifesting as a swell set of new
keyboard caps. C'mon - just look at that cute little rho, or the
noble edifice of the dotted-quad.

Of course, few languages can produce source as readable as ETA's.[1]
OTOH, I've had to read through pages of Java recently (analysis and design of
a new web component for my corporate masters, requiring review of our current
j2ee web apps), and if Java is the new "readability", then give me C any day.
Worse spaghetti code than you could find in any assembly program. I have no
doubt that C# and C++ are just as bad.


It's possible to write highly readable code in Java, of course, just
as it is in C, but many Java programmers for some reason seem to suffer
from a variety of common style deficiencies. I've seen a lot of Java
source which was apparently written in an editor with a 200-character
line length, for example.

As untold commentators have pointed out untold times, a talented
programmer can produce a mess in any language. There *are* languages
which make it more or less convenient to produce readable source, but
for all but the worst offenders it's possible. (The only real
counterexample I can think of would be an evil esoteric language,
even then perhaps only if it didn't permit comments. I don't think
Unlambda[2] has any provision for comments, for example. If it had
them, even an Unlambda program might be rendered readable, for
suitably small values of "unreadable".)

1. http://www.miketaylor.org.uk/tech/eta/doc/
2. http://www.eleves.ens.fr:8080/home/m...rams/unlambda/

--
Michael Wojcik mi************@microfocus.com

Vinegar keeps more flies away than honey does.
Nov 16 '05 #28
"C# Learner" <cs****@learner.here> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
These are trivialities. Learn five or six computer languages (or three
or four
that are entirely unrelated to each other), /then/ formulate your
opinion.
Well, I have learned BASIC, C-like languages (C and C++), Delphi
(formerly named 'Object Pascal') and Smalltalk.

So, basically, I've learned a couple of procedural languages, and a
couple of OO ones.


And which one do seems you the best?
Which one seems to have the best syntax?


I'd say Delphi has the clearest syntax.


Delphi is boring. IMO syntax of C is much more funny.
[...]
I don't understand why I'd need to learn a few more languages to
understand that C's basic syntax could be nicer.
Suggest some improvements and I'll say you, why you're wrong ;-)


Simply:


Well, rephrasing Paul Graham, I should say "Don't wait until C will become
as
clear as Python, use Python instead".
1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.
Actually in C it is permitted to build much more complicated conditions.
It's generally bad programming style, but that feature requires parenteses.
2) Remove begin/end code block markers and require indentation instead.


Block markers vs. indentation is IMO eternal flame war.
Nov 16 '05 #29
"Paul Hsieh" wrote :
- Try this one on for size:

char a = -1, b = -2;
unsigned short x = (1 > 0) ? a : b;

printf ("x = %d\n", x);

What do you think is printed out? Explain it.


the same as in c# :

unchecked
{
char c = (char) -1;
ushort x = c;
Console.WriteLine(">> " + x);
}
65535


wich is the way -1 is represented in 16 bits unsigned data ;)

what is your point ? what else where we supposed to expect ? 255 ?

--
Francois Beaussier
Fr******@3ie.org.remove
Nov 16 '05 #30
On Thu, 27 May 2004 00:56:59 +0100, in comp.lang.c , C# Learner
<cs****@learner.here> wrote:
One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.
if (FooBar(Parse(Process(GetInput())))
DoSomething();
(he prefers)
if FooBar(Parse(Process(GetInput())):
DoSomething();


Okay, I'll bite. Why on earth do you consider this in any way an
improvement? What difference does it make to anything?
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 16 '05 #31
On Thu, 27 May 2004 04:36:24 +0100, in comp.lang.c , C# Learner
<cs****@learner.here> wrote:
Aha, but I only saw Python code for the /first/ time yesterday. :-)


*shrug*
Me too. And C is much easier to read. YMMV.
Obviously this entire post is off-topic. Python is not C, C will never be
Python and you've cross-posted to C# which is not C either.


Hmm... I have to disagree. I feel that this discussion is about C's
basic syntax and its ubiquity in popular modern-day languages.


But the topic of CLC is the C /language/ and using it, not whether there's
a neater way to structure the language. You could try talking about that
over in comp.std.c, but I warn you, you'll get roasted in about 2 seconds.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 16 '05 #32
On Thu, 27 May 2004 04:36:24 +0100, in comp.lang.c , C# Learner
<cs****@learner.here> wrote:
Aha, but I only saw Python code for the /first/ time yesterday. :-)


*shrug*
Me too. And C is much easier to read. YMMV.
Obviously this entire post is off-topic. Python is not C, C will never be
Python and you've cross-posted to C# which is not C either.


Hmm... I have to disagree. I feel that this discussion is about C's
basic syntax and its ubiquity in popular modern-day languages.


But the topic of CLC is the C /language/ and using it, not whether there's
a neater way to structure the language. You could try talking about that
over in comp.std.c, but I warn you, you'll get roasted in about 2 seconds.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 16 '05 #33

Irrwahn Grausewitz wrote:
[...snip...]
Smalltalk is a functional language.


How do you define "functional language" ?
Nov 16 '05 #34
On Thu, 27 May 2004 03:40:42 +0100, "Kieran Simkin"
<ki****@digital-crocus.com> wrote:
Another nicety about Python is the fact that whitespace is used for
defining code blocks.


What you call a nicety <sic>, I call a liability.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 16 '05 #35
On Thu, 27 May 2004 04:36:24 +0100, C# Learner <cs****@learner.here>
wrote:
Also, I guess I'm just trying to make a point and get heard here; and,
at the same time, I want to hear what those who are more experienced
than me have to say on the matter -- especially C gurus!

For the record, I don't /hate/ this C syntax of which I talk. I just
have a feeling of disbelief, perhaps, that some badly-implemented (in my
opinion) syntactial elements of the C language have passed through to
modern programming languages.


Forgive me if I'm wrong, but my impression is that you don't have a
deep enough understanding of the C language, and indeed of programming
languages in general, to appreciate the reasons for the syntax
features you're commenting on. Take your original example of
eliminating the deli meters around the conditional in an if statement.
Think about what this would mean for compound conditions. Combine that
with the Python-style blocking and then think about an if statement
which tests for several conditions, requiring more than one line to
write.

As you study and understand the language, you'll find that it's all
nicely consistent, and that there are good reasons for most of the
features which seem odd to you. One of the characteristics of C is
terseness, and extra parens aren't required by the language for no
reason.

Also, think about the fact that language inventors and implementers
are, by and large, a pretty bright bunch. In general, they probably
have more and wider experience in the field than you do, and some of
them might even be as smart ;-) Those features which have passed
through to modern languages have done so for a reason.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 16 '05 #36
> Delphi is boring. IMO syntax of C is much more funny.

Delphi is Pascal with maybe a few bells and whistles.
Therefore, it's based on an older language than C, maybe that's why
it's a bit boring.

Well, rephrasing Paul Graham, I should say "Don't wait until C will become
as
clear as Python, use Python instead".


If you really think Python has clearer syntax than C, well, think twice.
One terrible fact is this indentation thing in Python to delimit code
blocks. One tab or space is left behind, and the whole thing is screwed.
To me, it's an unacceptable syntax issue.
Nov 16 '05 #37
In <bu********************************@4ax.com> Alan Balmer <al******@att.net> writes:
On Thu, 27 May 2004 03:40:42 +0100, "Kieran Simkin"
<ki****@digital-crocus.com> wrote:
Another nicety about Python is the fact that whitespace is used for
defining code blocks.


What you call a nicety <sic>, I call a liability.


None of the programming languages assigning semantics to indentation
has ever become mainstream. There must be a reason...

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 16 '05 #38
"Michael Voss" <mi**********@lvrREMOVE.deCAPS> wrote:

Irrwahn Grausewitz wrote:
[...snip...]
Smalltalk is a functional language.


How do you define "functional language" ?


I don't - others already did. If you're interested in this subject
I suggest to Go Ogle for the comp.lang.functional FAQ - it contains
a nice explanation of functional vs. procedural programming paradigms.

Ob the portion you snipped: While both C++ and Smalltalk are OO
languages, the former is a mere procedural, the latter a mere
functional language.

Regards
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
clc OT guide : http://benpfaff.org/writings/clc/off-topic.html
Nov 16 '05 #39
Alan Balmer wrote:
On Thu, 27 May 2004 04:36:24 +0100, C# Learner <cs****@learner.here>
wrote:
[...]
Forgive me if I'm wrong, but my impression is that you don't have a
deep enough understanding of the C language, and indeed of programming
languages in general, to appreciate the reasons for the syntax
features you're commenting on.
I believe that I appreciate the reasons for these features. What I'm
saying is that I think that there are better (in terms of allowing the
user of the language to write readable code) alternatives that could
have been implemented instead.
Take your original example of
eliminating the deli meters around the conditional in an if statement.
Think about what this would mean for compound conditions. Combine that
with the Python-style blocking and then think about an if statement
which tests for several conditions, requiring more than one line to
write.
a) Valid C syntax:

if (foo &&
bar) {
foobar();
}

b) Similar code to the above but using my suggested syntax changes:

if foo &&
bar:
foobar();

Why wouldn't (b) be feasible here?

Everything from 'if' to ':' is considered the condition. After the
newline after ':', whitespace is required to form a code block.
As you study and understand the language, you'll find that it's all
nicely consistent, and that there are good reasons for most of the
features which seem odd to you.
The only way in which they seem odd to me is that they make code much
less readable than it could be, in my opinion.

Okay, if you don't agree with the 'if'..':' idea, then how about
changing the parentheses required for test conditions for a different
pair of characters? An ideal pair would be a pair that isn't used
elsewhere in the language, for readability's sake.
One of the characteristics of C is
terseness, and extra parens aren't required by the language for no
reason.
My point is that a different construct could be substituted in each case.
Also, think about the fact that language inventors and implementers
are, by and large, a pretty bright bunch. In general, they probably
have more and wider experience in the field than you do, and some of
them might even be as smart ;-)
So those who invented C's syntax are necessarily brighter than those who
invented, say, Python's syntax?
Those features which have passed
through to modern languages have done so for a reason.


I honestly wonder what that reason is.

Regards
Nov 16 '05 #40
Mark McIntyre wrote:
On Thu, 27 May 2004 00:56:59 +0100, in comp.lang.c , C# Learner
<cs****@learner.here> wrote:

One of the biggest flaws in C syntax, in my opinion, is the required
parentheses for test conditions.


if (FooBar(Parse(Process(GetInput())))
DoSomething();

(he prefers)

if FooBar(Parse(Process(GetInput())):
DoSomething();


Okay, I'll bite. Why on earth do you consider this in any way an
improvement? What difference does it make to anything?


I believe that it'd improve code readability. Have you noticed how, in
langauges which use such syntax, people often write something like:

if ( FooBar(Parse(Process(GetInput())) )

i.e. they use spaces because of the fact that parentheses are used both
in test conditions and function calls. As far as I see, when doing so,
they're just attempting to work around a syntactical design flaw of the
language.
Nov 16 '05 #41
Grumble wrote:
C# Learner wrote:
Simply:

1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.

#define if if (
#define then )

int main(int argc, char **argv)
{
if argc-1 == 0 then return 666;
return 0;
}


Point taken. :-)

Still, though, if others don't do this, then, when reading others' code,
the problem (as I see it) is still there.
Nov 16 '05 #42
I. Appel wrote:

[...]
I'd say Delphi has the clearest syntax.


Delphi is boring. IMO syntax of C is much more funny.


<my opinion>
Delphi code is, in general, much more readable than C code. Therefore,
Delphi coders have an easier life than C coders.
</my opinion>

[...]
Nov 16 '05 #43
On Thu, 27 May 2004 21:08:47 +0100, C# Learner <cs****@learner.here>
wrote:

My point is that a different construct could be substituted in each case.


Making the syntax more complex, for no particular benefit that I can
see.

Parentheses, brackets and braces represent the general concept of
grouping. Even when seen in an unfamiliar context, one can get the
idea. I see no need to invent a different grouping symbology for each
use.

Everyone understands the symmetry between '(' and ')'. The symmetry
between 'if' and ':' is not nearly as intuitive. And now you propose
that each case that requires a grouping operator have a different
construct?

Of course, you say "could be substituted", which is obviously true. It
would certainly add a new dimension to the obfuscated C contests.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 16 '05 #44
On Thu, 27 May 2004 21:11:28 +0100, in comp.lang.c , C# Learner
<cs****@learner.here> wrote:
Mark McIntyre wrote:

Okay, I'll bite. Why on earth do you consider this in any way an
improvement? What difference does it make to anything?
I believe that it'd improve code readability.


I disagree. The delimiter helps mark the ends of the various parts of the
statement. With only whitespace to work with, compound statements become
almost impossible to correctly read.
Have you noticed how, in
langauges which use such syntax, .....they use spaces because of the fact that parentheses are used both
in test conditions and function calls. As far as I see, when doing so,
they're just attempting to work around a syntactical design flaw of the
language.


Gonads. This is nothing more than a style thing. French people put two
spaces after a full stop. English people don't. Same idea.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 16 '05 #45
C# Learner wrote:
Why is C syntax so uneasy on the eye?

In its day, was it _really_ designed by snobby programmers to scare away
potential "n00bs"? If so, and after 50+ years of programming research,
why are programming languages still being designed with C's syntax?

These questions drive me insane. Every waking minute...


This is an obvious troll. Please Ignore it.
Nov 16 '05 #46
Grumble <a@b.c> writes:
C# Learner wrote:
Simply:
1) Remove the need to specify parentheses for test conditions --
substitute a test condition terminator, such as Python's ':'.


#define if if (
#define then )

int main(int argc, char **argv)
{
if argc-1 == 0 then return 666;
return 0;
}


Yes, that's very clever. Please don't do it in any code that I might
ever have to maintain, or read -- or that anyone else might ever have
to maintain or read.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 16 '05 #47
qe*@pobox.com (Paul Hsieh) writes:
[...]
C has plenty of ambiguity:

- Braces are optional if there is only one statement for if() or for() or
while(). (But not for do ... while(), switch, or structure/union
declarations.)


That's not an ambiguity, it just means there's more than one way to
write a given program. The fact that braces are optional in many
contexts does not imply that there is any C program that can be
interpreted in any of two or more ways; the interpretation is
unambiguous in each case.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 16 '05 #48
C# Learner <cs****@learner.here> writes:
Kieran Simkin wrote:

[...]
Obviously this entire post is off-topic. Python is not C, C will never be
Python and you've cross-posted to C# which is not C either.


Hmm... I have to disagree. I feel that this discussion is about C's
basic syntax and its ubiquity in popular modern-day languages.

If such a discussion is off-topic for comp.lang.c, then I honestly
don't know quite where it would be /on/-topic. In fact, I even
considered renaming the subject of this post to 'Re: C Syntax', but
didn't want to enrage people by doing so.


Discussion of how other languages have influenced C would be topical
in comp.lang.c. Discussion of how C has influenced a hypothetical
language Foo would be topical (I presume) in comp.lang.foo. But if
you want to discuss how C has influenced other languages in general,
that's probably a good topic for comp.lang.misc.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 16 '05 #49
Da*****@cern.ch (Dan Pop) wrote:

None of the programming languages assigning semantics to indentation
has ever become mainstream. There must be a reason...


The language of makefiles?
(Before you say "it isn't a language", it seems to be as much
a language as Prolog is)
Nov 16 '05 #50

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

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
14
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def...
16
by: George Sakkis | last post by:
I'm sure there must have been a past thread about this topic but I don't know how to find it: How about extending the "for <X> in" syntax so that X can include default arguments ? This would be very...
23
by: Carter Smith | last post by:
http://www.icarusindie.com/Literature/ebooks/ Rather than advocating wasting money on expensive books for beginners, here's my collection of ebooks that have been made freely available on-line...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
4
by: Jeremy Yallop | last post by:
Looking over some code I came across a line like this if isalnum((unsigned char)c) { which was accepted by the compiler without complaint. Should the compiler have issued a diagnostic in this...
177
by: C# Learner | last post by:
Why is C syntax so uneasy on the eye? In its day, was it _really_ designed by snobby programmers to scare away potential "n00bs"? If so, and after 50+ years of programming research, why are...
4
by: Bob hotmail.com> | last post by:
Everyone I have been spending weeks looking on the web for a good tutorial on how to use regular expressions and other methods to satisfy my craving for learning how to do FAST c-style syntax...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.