Re: Chinese Syntax

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 05/28/04


Date: Thu, 27 May 2004 23:15:03 -0700


"C# Learner" <csharp@learner.here> wrote in message
news:%23f322iHREHA.132@TK2MSFTNGP09.phx.gbl...
> Keith Thompson wrote:
>
> > [...] There are certainly some things I would
> > do differently if I were designing C from scratch today, [...]
>
> This is basically what I've had set in my mind while participating in
> this thread.
>
> I think I've finally found someone who's tuned into my wavelength,
> perhaps; in any case, someone who truly understands my motive.
>
> :-)

While Keith points out there are some things he would do differently, C#
is in essence the attempt at an entirely new language, and yet they kept all
of the older syntax. Anders was a Pascal guy, and yet he chose the
constructs he did in his custom tailored language why? Well, because he
thought they provided the most power for the language without denying users
access to some commonly used programming tools.

The first tool is debugging and error assessment. The strict language
guidelines
of C# make it very easy to discover the root of a lexical or parsing error. At
the same time they make it easy to point out and find common programming
mistakes.

Verbosity or the lack thereof as a tool:
Take language constructs like begin...end to designate blocks... They
are verbose, why not just type { and }, after all this is much shorter. Why do
I need to separate my code by all that whitespace:

    if something:
        foobar

When I could easily write it on one line without all of that crappy whitespace

    if ( something ) { foobar; }

What about intellisense and other features users have grown to love? Are they
easier,
faster, more efficient when written against a C type language? Does the explict
bounding of statement/expression/block scopes help the underlying intellisense
processor
to more accurately understand what the user is doing? Does it remove levels of
ambiguity
that would otherwise exist? When does whitespace become important, when is it
not,
does tabs to spaces or spaces to tabs affect the compilation of your
application? What
happens to whitespace nested blocks when I use two spaces per indent, but
convert to
tabs that are 4 to 8 spaces per indent? Does my code resize properly or do all
of my 2/4/6
spaces get turned into a single tab. Does a tab count as a single indention
character or
multiple? For instance, does a single space or a single tab have the same
nesting depth?

There are so many more aspects to programming today than loading up your
favorite
text editor and hacking away in the most efficient form that you can manage.
Code generators,
intellisense, auto-complete, are all tools taking up precious processor time
trying to figure
out what you want to do, and I think the trade-off between some extra semantics
versus
confusing the hell out of the computer that is making my life a bit easier, is
something I'm quite
happy with.

-- 
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers


Relevant Pages

  • Re: Chinese Syntax
    ... is in essence the attempt at an entirely new language, ... When I could easily write it on one line without all of that crappy whitespace ... does tabs to spaces or spaces to tabs affect the compilation of your ... does a single space or a single tab have the same ...
    (comp.lang.c)
  • Re: Yet Another Spinoza Challenge
    ... whitespace between code elements have on a C program's ... Apparently, whitespace is critical. ... But it could be spaces or tabs. ... In the C language, how does one write the statement, "if i NOT equal ...
    (comp.lang.c)
  • Re: Line continuation in Perl
    ... whitespace isn't something that stands alone - otherwise it would still ... If every one is going to create his/her language, ... I do think Larry is addressing me in those last two sentences. ... Unless he's changing his mind on some particular things, ...
    (comp.lang.perl.misc)
  • Re: Maybe a much simpler syntax
    ... > I found the Whitespace language have a very simple syntax: ... > tokens, 5 commands. ... > Many commands require numbers or labels as parameters. ...
    (comp.lang.tcl)
  • Re: Using the Python Interpreter as a Reference
    ... Tabs have every theoretical advantage and only one practical ... Why on earth should your language dictate the width of an indentation? ... can be computed by a Turning Machine: a Turing Machine ... Forth is much smaller than Java, but I would say that Forth is much, much ...
    (comp.lang.python)