Re: [OT] Chinese Syntax
"C# Learner" <csharp@learner .here> wrote in message
news:euOxH13QEH A.3744@TK2MSFTN GP10.phx.gbl...[color=blue]
> Alex Moskalyuk wrote:
>[color=green]
> > 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?[/color]
>
> One of the biggest flaws in C syntax, in my opinion, is the required
> parentheses for test conditions.[/color]
I think you confuse a flaw with part of the language specification.
[color=blue]
>
> Here's a very simple example:
>
> void Foo
> {
> if (FooBar(Parse(P rocess(GetInput ())))
> DoSomething();
> }
>
> Imagine if, instead, we could write the following:
>
> void Foo
> {
> if FooBar(Parse(Pr ocess(GetInput( ))):
> DoSomething();
> }
>[/color]
I'm imagining, and I'm reminded of BASIC.
[color=blue]
> 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.
>[/color]
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.
[color=blue]
> 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?[/color]
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.
[color=blue]
>
> Every time I see code that conforms to C's basic syntax, I cringe; yet I
> write such code every day.
>
> Why C? Why?![/color]
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.
"C# Learner" <csharp@learner .here> wrote in message
news:euOxH13QEH A.3744@TK2MSFTN GP10.phx.gbl...[color=blue]
> Alex Moskalyuk wrote:
>[color=green]
> > 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?[/color]
>
> One of the biggest flaws in C syntax, in my opinion, is the required
> parentheses for test conditions.[/color]
I think you confuse a flaw with part of the language specification.
[color=blue]
>
> Here's a very simple example:
>
> void Foo
> {
> if (FooBar(Parse(P rocess(GetInput ())))
> DoSomething();
> }
>
> Imagine if, instead, we could write the following:
>
> void Foo
> {
> if FooBar(Parse(Pr ocess(GetInput( ))):
> DoSomething();
> }
>[/color]
I'm imagining, and I'm reminded of BASIC.
[color=blue]
> 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.
>[/color]
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.
[color=blue]
> 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?[/color]
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.
[color=blue]
>
> Every time I see code that conforms to C's basic syntax, I cringe; yet I
> write such code every day.
>
> Why C? Why?![/color]
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.
Comment