

C++ Resyntaxed - parenthesis
http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html

======
jlangenauer
I'm not a huge fan after a quick read - the new syntax adds too many new
keywords for my tastes e.g. type, inherits, abstract, lang, obj, func etc. I'm
of the school of thought that words with semantic meaning should be used as
much as possible for expressing the logic and meaning of the program itself,
rather than the language. Otherwise, it becomes harder to separate the actual
program from the language - this is one of Java's problems.

Particularly take the class declarations as an example:

    
    
      type ListClass : class inherits public ListBase, private virtual ListImpl
      { /* member declarations */ }
    

adds nothing but verbosity to the C++ declaration:

    
    
      class ListClass : public ListBase, private virtual ListImpl
      { /* member declarations */ };

~~~
alextgordon
"Make everything as simple as possible, but not simpler" seems a good rule to
design languages by. The common case should be expressible with as little
syntactic friction as possible, without making the language ambiguous or
unreadable.

 _": class inherits public"_ is just 23 characters of pointless line noise.

~~~
eru
Perhaps inheritance shouldn't be the common case in the first place?

------
_sh
A couple of notes:

1\. This paper is from 1996 (oh my! 14 years), and so does not consider the
syntactic clean-up performed with C++0X.

2\. The paper is co-authored by Damian Conway
(<http://en.wikipedia.org/wiki/Damian_Conway>), perl legend, author of
Quantum::Superpositions ([http://search.cpan.org/~dconway/Quantum-
Superpositions-1.03/...](http://search.cpan.org/~dconway/Quantum-
Superpositions-1.03/lib/Quantum/Superpositions.pm))

3\. This seems to be part of research conducted on 'Human Factors in
Programming Languages', which includes another paper on the design of SPECS
(the syntactic clean-up mentioned in this paper), and another interesting-
sounding one: 'Seven Deadly Sins of Introductory Programming Language Design'
(see <http://www.csse.monash.edu.au/~damian/papers/>).

------
tlb
Changing the declaration syntax could be a big improvement, but changing
assignment operators is a bad idea. (summary: a=b now tests for equality, a:=b
is assignment). I know if I start using a language where a=b means equality
test, I'm going to make that mistake in Javascript, Python, and every other
language I use.

When designing a new language, remember that people spend most of the time
using other languages. So don't be gratuitously incompatible in dangerous
ways.

~~~
gte910h
Yeah, := should be assigns, and == should be equal, and = should be an error.

------
barrkel
Unfortunately, most of the pathology of C++ lies in its semantics, not its
syntax.

~~~
eru
Yes. But it's better than nothing.

------
vorg
C++ could use both syntaxes, old and new, just as programmers can use any
syntax coloring scheme when viewing a program in an IDE. Anything sitting
above a language's AST is customizable by programmers. It's just for
historical reasons why programs in different languages are stored as
consecutive text in files, instead of, say, tree structures on disk.

------
roryokane
I'm surprised and disappointed that this still requires a semicolon after each
line, and parentheses around the conditions in for, if, etc. statements.

~~~
eru
Yes, going closer to Python-style in this regard would have been nice.

------
swah
(not the author)

Inside C++, there is a much smaller and cleaner language struggling to get
out. \- Bjarne Stroustrup

Clay is an attempt at creating that language.

Link: <http://tachyon.in/clay/>

------
daniel02216
This looks fairly interesting, at first glance. Is there a similar document
for C by itself?

------
eru
Looks sane to me.

------
kqueue
seriously?

