What do you think of SPECS?

R

rpgfan3233

In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.

After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that it
might be feasible to consider.

My question is: what do _you_ think of SPECS?

[1] - http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html
 
J

Jeff Schwab

rpgfan3233 said:
In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.

After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that it
might be feasible to consider.

My question is: what do _you_ think of SPECS?

[1] - http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html

It looks like it's based on an ancient draft standard of C++. Is that
correct? How does it correlate with the current and upcoming standards?
What is the plan for maintaining consistent mappinsg between this
altered syntax and the traditional syntax?
 
P

Paul Brettschneider

Hi,
In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.

After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that it
might be feasible to consider.

My question is: what do _you_ think of SPECS?

I somehow like the declaration part ("func set_new_handler :
(^(void->void) -> ^(void->void));" instead of void "(*set_new_handler(void
(*)(void)))(void);"), but I dislike the operator part. Too much like Pascal
and there's a reason K&R chose '=' and '==' instead of ':=' and '='
respectively: the assignment operator is used several times more often than
the comparison operator. In this case I prefer the concise notation over
the mathematical correct one. Also the dereference operator in postfix
notation is very strange, IMHO, but I figure Pascal does it in the same
way.

Anyway, thanks for posting, this was an interesting read!
 
D

Daniel T.

rpgfan3233 said:
In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.
After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that it
might be feasible to consider.
My question is: what do _you_ think of SPECS?

It looks like it's based on an ancient draft standard of C++. Is that
correct?

According to the footnote:
Working Paper for Draft Proposed International Standard for
Information Systems - Programming Language C++, ANSI Document X3J16/95-
0087.
 
O

Obnoxious User

In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the same
Web page.

After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is proposed
that it make use of the same preprocessor, I believe that it might be
feasible to consider.

My question is: what do _you_ think of SPECS?

[1] -
http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html

I've always disliked the repeated use of ^ since it's a dead key on
the swedish keyboard, and thus requires an extra keystroke to appear.
And I assume its a dead key on many more keyboards as well.

And I agree with Paul, ':=' is worse than '='.

OU
 
I

Ivan Vecerina

: In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
: provided an altered C++ syntax; a syntax meant to be easier to
: understand. You can find the paper online in HTML format [1]. If you
: prefer PDF or PostScript, they are available for download from the
: same Web page.
:
: After reading it, I find it much easier to understand, though I admit
: that acclimation could very well take a long time. Since it is
: proposed that it make use of the same preprocessor, I believe that it
: might be feasible to consider.
:
: My question is: what do _you_ think of SPECS?
:
: [1] -
http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html

It had been discussed around here (and on .moderated) at the time.
The key issue is that the cost/benefit of the change is not favorable.

Yes, the idiosyncrasies of the C/C++ syntax is somewhat of a barrier
to entry, but it is pretty minor in comparison to other complexities.

Also, nowadays, many new developers are taught programming using
Java or Python (not Pascal as used to be the case), so they might
actually be less familiar with the SPECS syntax than with the
current/native one.
 
B

Bo Persson

rpgfan3233 said:
In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian
Conway provided an altered C++ syntax; a syntax meant to be easier
to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.

After reading it, I find it much easier to understand, though I
admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that
it might be feasible to consider.

My question is: what do _you_ think of SPECS?

[1] -
http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html

I think they somehow put the focus at the wrong level, and improve a
few little things that are not too important, improving C rather than
C++.

They also introduce new confusions while trying to solve the old ones,
for example:

type myint : int; // this is a typedef, not a new type

You would also use the keyword 'obj' to define a reference, even
though a reference is not an object. Confusing?

If you are going to change the syntax, why not disallow declaring
multiple variables in the same declaration?


I wouldn't have chosen keywords like obj, func, ctor, or dtor in a new
language, but gone the Ada way of selecting complete words that are
already short (like limited instead of protected).


Some of the things are not even worth "fixing", like interface to
assembly, friend functions or C style casts. Is the array form of
placement new really a big problem? Using the continue keyword to,
well, continue execution in a switch-statement, but not in a
for-statement?!

It is not often that I run into the "TemplateClass<( 1>2 )>" problem,
or that I have to add an extra template keyword to resolve a nested
template expansion. It is also not at all obvious to me why "[public]"
is better that "public:". The operator +:= just looks silly.



Bo Persson
 
J

Jerry Coffin

In "A Modest Proposal: C++ Resyntaxed," Ben Werther and Damian Conway
provided an altered C++ syntax; a syntax meant to be easier to
understand. You can find the paper online in HTML format [1]. If you
prefer PDF or PostScript, they are available for download from the
same Web page.

After reading it, I find it much easier to understand, though I admit
that acclimation could very well take a long time. Since it is
proposed that it make use of the same preprocessor, I believe that it
might be feasible to consider.

From their conclusion:

In implementing a new text binding for the semantics of C++,
we have enjoyed the unparalleled advantage of hindsight and
the freedom to step beyond the restrictions of the
evolutionary path of C++. Most significantly we have
rejected the "failed experiment" of the C declaration
notation, in favour of a more Pascal-like approach.

Hmm...let's consider the same, but with respect to Java:

In implementing a new text binding for the semantics of
Smalltalk, we have enjoyed the unparalleled advantage of
hindsight and the freedom step beyond the restrictions of
the evolutionary path of Smalltalk. Most significantly we
have rejected the "failed experiment" of Pascal
declaration syntax in favor of a more C-like approach.

While I'm the first to admit that this is a bit off (Java's semantics
really fall well short of Smalltalk's), it's about as accurate as his
statement (i.e. both contain some accuracy, but neither is precisely
correct). OTOH, not even its author seems to care enough about SPECS to
have ever updated it to cover anything newer than a very early draft of
C++, whereas Java has come into relatively wide use.

There are quite a few things most of us would like to fix in C++. Most
of us also realize that the success of C++ is based in large part on
backward compatibility, which limits the degree to which most of those
problems can be fixed.

IMO, rather than fixing real problems, this proposal is primarily an
attempt at continuing to use a syntax with which a few people were
already familiar and comfortable. The benefits in terms of real
programming would be minimal -- for example, this not enable any new
capabilities in the language, nor make any programming technique
significantly easier.

At the same time, the costs would be quite high. The investment in
existing compilers, code and programmers would all be thrown away to
varying degrees. Except to a few people who have continued to use Pascal
long after the rest of the world abandoned it, the benefits would be
minimal. The authors use set_new_handler as an example of the difficult
syntax of C++ declarations, claiming that no more than 1 in 10
programmers could write it without references. They seem to miss the
real point of their own example: the reason almost nobody can do this
without assistance is that nearly nobody ever has any reason to do so at
all. I've written C++ for well over a decade now, and _never_ had any
reason to write that particular declaration, even once!

This would cause far greater problems than it would fix.
 
E

Eberhard Schefold

Obnoxious said:
I've always disliked the repeated use of ^ since it's a dead key on
the swedish keyboard, and thus requires an extra keystroke to appear.
And I assume its a dead key on many more keyboards as well.

This is definitely OT and platform dependent, but on my German keyboard
on Windows

typing ^ <Space> produces ^
typing ^ ^ produces ^^
typing ^ ( produces ^(

so there is only an additional key stroke necessary when the circumflex
stands alone (or when I want to "see" the circumflex before continuing).
Are you sure this is different on your system?
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top