9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: Re[4]: [9fans] Design choice is C preprocessor
@ 2001-04-26 13:48 presotto
  2001-04-26 15:35 ` Douglas A. Gwyn
  2001-04-26 23:06 ` Re[4]: " Boyd Roberts
  0 siblings, 2 replies; 11+ messages in thread
From: presotto @ 2001-04-26 13:48 UTC (permalink / raw)
  To: 9fans

I haven't been happy with a language since C.  I wasn't thrilled with
C but, since I was coming from Bliss, C seemed like a step up.

C++ has all the disadvantages of C with an unbelievably baroque
structure thrown in.  Bjarne, and later his acolytes, took the
most favored road to successful acceptance of a new language;
make it look like an old one and then say no to any interest
group that wanted to add something on.  They were smart enough
to make most of the additions over straight C fairly separable
so that one doesn't have to use them.  The result is that every
C++ programmer seems to be using a different language since they
usually pick different mixes of features.  Overloading basic
operators was the best obfuscation technique I've ever come
across.  You think you understand a code fragment but wow!
C++'s information hiding doesn't really work because you
need to include the headers in other programs so you have
to distill them to really hide anything and then offsets
screw up.  Constructors/destructors are not close enough
to garbage collection, my C++ long lived servers didn't
have less lost memory than my C ones.  The list goes
on.

Limbo is the closest to something I can live with.  It too
inherits a lot of C'ness but it has 2 things that make it
a winner; real gc (that went fast) and module loading.
Both were done better than Java, I believe.
Other features like strings as a firt class type with their own
operators were useful but not as important.  I would have
been happier with Limbo as a first class language on
Plan 9 than something that runs under emu.  A more
integrated environment on Plan 9 would be cool.

Java is probably the next best.  It's type structure looks
a bit too much like the type structure I disliked in C++.
The finalize routines are like destructurs but have
the added feature of interacting strangely and confusingly
with the gc.  The class hierarchy is incredibly large and
impossible to navigate.  Every time I turn around there
seems to spring up a new way of linking things together
to get some other feature.  On the whole, I like it better
than C++ and don't have enough experience in it to decide
if I could live with it.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Design choice is C preprocessor
  2001-04-26 13:48 Re[4]: [9fans] Design choice is C preprocessor presotto
@ 2001-04-26 15:35 ` Douglas A. Gwyn
  2001-04-26 23:06 ` Re[4]: " Boyd Roberts
  1 sibling, 0 replies; 11+ messages in thread
From: Douglas A. Gwyn @ 2001-04-26 15:35 UTC (permalink / raw)
  To: 9fans

Dave Presotto's observations are similar to mine,
except while I studied Bliss I never used it
(but I did write a lot of Fortran and assembly).
It would in principle be possible to fix many of
C's biggest problems, but not without breaking a
lot of existing code.  However, the large body of
experience with C (good and bad) can be used to
guide design of a new PL.  I think, from my
limited exposure to it, that Limbo is a positive
step forward.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 13:48 Re[4]: [9fans] Design choice is C preprocessor presotto
  2001-04-26 15:35 ` Douglas A. Gwyn
@ 2001-04-26 23:06 ` Boyd Roberts
  2001-04-26 23:28   ` Andrey A Mirtchovski
  1 sibling, 1 reply; 11+ messages in thread
From: Boyd Roberts @ 2001-04-26 23:06 UTC (permalink / raw)
  To: 9fans

From: <presotto@plan9.bell-labs.com>
> ... Overloading basic operators was the best obfuscation
> technique I've ever come across.  You think you understand
> a code fragment but wow!

yeah i avoid C++ at all costs.  as soon as there's a mention
of C++ on my resume i'll sent out to fix some monolithic
disaster which will require understanding _every_ line of
code.  that's not OO.  that's just stupid.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 23:06 ` Re[4]: " Boyd Roberts
@ 2001-04-26 23:28   ` Andrey A Mirtchovski
  2001-04-26 23:43     ` Boyd Roberts
                       ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Andrey A Mirtchovski @ 2001-04-26 23:28 UTC (permalink / raw)
  To: 9fans

 wow, for once i fully agree with boyd!

 i just got forced into C++ recently,  programming directx for someone around
 here..

 i must tell you, if you haven't seen C++ for windows, and their api, and
 their code, and their documentation, you're not ready to spend eternity in
 hell..

 i am seriously considering putting two screenshots of: C++ auto generated
 C++ code for VC++ 6.0 (MFC) vs any random source file from plan9 on a web
 page. the heading will be "see what you succumb to by going to the
 microsoft camp"...

 i admit, it's my first touch with windows programming besides pascal in
 high school, but I *am* scared.. MFC defies all purpose..

 one could go forever bitching about botched interfaces, unreadable/useless
 documentation and having to change all the programs in the world to swotch
 from v7.0 to v8.0 of their api... i simply can't fathom why somebody would
 live a life if they have to deal with it in a daily basis... (stock options
 that good?)

 ack.. my vocabulary is not good enough to explain my feelings with all the
 harshness that is required...

 andrey


On Fri, 27 Apr 2001, Boyd Roberts wrote:

> From: <presotto@plan9.bell-labs.com>
> > ... Overloading basic operators was the best obfuscation
> > technique I've ever come across.  You think you understand
> > a code fragment but wow!
>
> yeah i avoid C++ at all costs.  as soon as there's a mention
> of C++ on my resume i'll sent out to fix some monolithic
> disaster which will require understanding _every_ line of
> code.  that's not OO.  that's just stupid.
>
>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 23:28   ` Andrey A Mirtchovski
@ 2001-04-26 23:43     ` Boyd Roberts
  2001-04-26 23:47     ` Re[6]: " matt
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Boyd Roberts @ 2001-04-26 23:43 UTC (permalink / raw)
  To: 9fans

>  i must tell you, if you haven't seen C++ for windows, and their api, and
>  their code, and their documentation, you're not ready to spend eternity in
>  hell..

i spent two years in hell.  they told me it was a unix/ip job.

nope, windows 3, '95 and 'NT development.  wasn't even _on_ my resume.
i needed a job, so i thought:  how hard can it be?

to get those funky (but indicative of a broken user interface) toolbars
you have to call this C++ glop.  it can _not_ be coded in C.  the doc
doesn't exist or it's microsoft doc:

    <thesis>

    <ramble>

    <antithesis>

synthesis: give up in disgust and stick with what you know works in C.

awful, just awful.

at one point they let me build a firewall -- wow <sigh>.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re[6]: [9fans] Design choice is C preprocessor
  2001-04-26 23:28   ` Andrey A Mirtchovski
  2001-04-26 23:43     ` Boyd Roberts
@ 2001-04-26 23:47     ` matt
  2001-04-27  0:15       ` Boyd Roberts
  2001-04-27  9:14     ` Re[4]: " Randolph Fritz
  2001-04-27 14:40     ` Douglas A. Gwyn
  3 siblings, 1 reply; 11+ messages in thread
From: matt @ 2001-04-26 23:47 UTC (permalink / raw)
  To: Andrey A Mirtchovski

Hello Andrey,

AAM>  i must tell you, if you haven't seen C++ for windows, and their api, and
AAM>  their code, and their documentation, you're not ready to spend eternity in
AAM>  hell..

which kind of reminds me

"Well I'm telling you, when he prayed that prayer the lord turned on
the lights and for the first time that blind boy could see."

The C version of Windows 3.1 (from a dim and distant memory
haunted by Charles Petzold)

while(getMsg(Hwnd, wParam, lParam)) {
    switch (lParam) {
           case ButtonPressed :
                ...
           case ButtonReleased :
                ...
           case MouseMoved :
                ...
           case KeyPressed :
                ...
           case MenuItem:
                ...
    }
    dispatchMsg(Hwndm, wParam, lParam)
}

wasn't much fun either

--
Best regards,
 matt                            mailto:matt@proweb.co.uk




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re[6]: [9fans] Design choice is C preprocessor
  2001-04-26 23:47     ` Re[6]: " matt
@ 2001-04-27  0:15       ` Boyd Roberts
  0 siblings, 0 replies; 11+ messages in thread
From: Boyd Roberts @ 2001-04-27  0:15 UTC (permalink / raw)
  To: 9fans

> The C version of Windows 3.1 (from a dim and distant memory
> haunted by Charles Petzold)

petzold's book was dreadful.  i tried to use it.  it was
unreadable and the code fragments were awful; the 14 page
switch statement school of coding.

come to think of it, the book was so thick that i think
it must of been written using the 14 page switch statement
school of writing.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 23:28   ` Andrey A Mirtchovski
  2001-04-26 23:43     ` Boyd Roberts
  2001-04-26 23:47     ` Re[6]: " matt
@ 2001-04-27  9:14     ` Randolph Fritz
  2001-04-27 14:40     ` Douglas A. Gwyn
  3 siblings, 0 replies; 11+ messages in thread
From: Randolph Fritz @ 2001-04-27  9:14 UTC (permalink / raw)
  To: 9fans

In article
 <Pine.GSO.4.10.10104261714100.5516-100000@ultra5f.usask.ca>,
 Andrey A Mirtchovski wrote:
>  wow, for once i fully agree with boyd!
>
>  i must tell you, if you haven't seen C++ for windows, and their api, and
>  their code, and their documentation, you're not ready to spend eternity in
>  hell..
>

Yah.  I decided I'd discovered something worse than COBOL on DOS/360,
when I tried that.

Still, it's not fair to blame that on C++. :-)

Randolph


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Design choice is C preprocessor
  2001-04-26 23:28   ` Andrey A Mirtchovski
                       ` (2 preceding siblings ...)
  2001-04-27  9:14     ` Re[4]: " Randolph Fritz
@ 2001-04-27 14:40     ` Douglas A. Gwyn
  3 siblings, 0 replies; 11+ messages in thread
From: Douglas A. Gwyn @ 2001-04-27 14:40 UTC (permalink / raw)
  To: 9fans

Andrey A Mirtchovski wrote:
>  i am seriously considering putting two screenshots of: C++ auto generated
>  C++ code for VC++ 6.0 (MFC) vs any random source file from plan9 on a web
>  page. the heading will be "see what you succumb to by going to the
>  microsoft camp"...

That would be kinda dumb, since auto generated code always looks
crappy compared to manually generated code.  I was once a heavy
Ratfor user, and its Fortran output was ugly, but so what?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] Design choice is C preprocessor
  2001-04-23 22:12 Andrew Pochinsky
@ 2001-04-25  1:34 ` Boyd Roberts
  0 siblings, 0 replies; 11+ messages in thread
From: Boyd Roberts @ 2001-04-25  1:34 UTC (permalink / raw)
  To: 9fans

From: "Andrew Pochinsky" <avp@honti.mit.edu>
>
> A historical question: What were reasons for #include to stand alone
> on a line? It seems that allowing #include "filename" anywhere does
> not change much the implementation, while imposing less restrictions
> on the programmer.

let me take a wild, stab in the dark at that one.  i guess is was that
the language was designed without obsfucation as a design goal.

--
Boyd Roberts                                          boyd@planete.net

  [trouble] seems to know pretty much where I am, most of the time.

    -- Riggs




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] Design choice is C preprocessor
@ 2001-04-23 22:12 Andrew Pochinsky
  2001-04-25  1:34 ` Boyd Roberts
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Pochinsky @ 2001-04-23 22:12 UTC (permalink / raw)
  To: 9fans


A historical question: What were reasons for #include to stand alone
on a line? It seems that allowing #include "filename" anywhere does
not change much the implementation, while imposing less restrictions
on the programmer.

--andrew



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-04-27 14:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26 13:48 Re[4]: [9fans] Design choice is C preprocessor presotto
2001-04-26 15:35 ` Douglas A. Gwyn
2001-04-26 23:06 ` Re[4]: " Boyd Roberts
2001-04-26 23:28   ` Andrey A Mirtchovski
2001-04-26 23:43     ` Boyd Roberts
2001-04-26 23:47     ` Re[6]: " matt
2001-04-27  0:15       ` Boyd Roberts
2001-04-27  9:14     ` Re[4]: " Randolph Fritz
2001-04-27 14:40     ` Douglas A. Gwyn
  -- strict thread matches above, loose matches on Subject: below --
2001-04-23 22:12 Andrew Pochinsky
2001-04-25  1:34 ` Boyd Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).