9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Design choice is C preprocessor
@ 2001-04-23 22:12 Andrew Pochinsky
  2001-04-25  1:34 ` Boyd Roberts
  0 siblings, 1 reply; 13+ 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] 13+ messages in thread

* Re: [9fans] Design choice is C preprocessor
  2001-04-23 22:12 [9fans] Design choice is C preprocessor Andrew Pochinsky
@ 2001-04-25  1:34 ` Boyd Roberts
  2001-04-25  8:15   ` Re[2]: " matt
  0 siblings, 1 reply; 13+ 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] 13+ messages in thread

* Re[2]: [9fans] Design choice is C preprocessor
  2001-04-25  1:34 ` Boyd Roberts
@ 2001-04-25  8:15   ` matt
  2001-04-26  3:10     ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: matt @ 2001-04-25  8:15 UTC (permalink / raw)
  To: Boyd Roberts

Hello Boyd,

Wednesday, April 25, 2001, 2:34:15 AM, you wrote:

BR> 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.

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

now you mention it, it's exectly what I've got with this legacy php
I'm working on. includes scattered everywhere, some conditional,
includes in includes. "Luckily" this php has a flat namespace so
you'll be reading a page and constantly saying to yourself "where did
that variable come from?"

It's heinous



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




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

* Re: Re[2]: [9fans] Design choice is C preprocessor
  2001-04-25  8:15   ` Re[2]: " matt
@ 2001-04-26  3:10     ` Boyd Roberts
  2001-04-26  7:29       ` Re[4]: " matt
  0 siblings, 1 reply; 13+ messages in thread
From: Boyd Roberts @ 2001-04-26  3:10 UTC (permalink / raw)
  To: 9fans

From: "matt" <matt@proweb.co.uk>
>
> It's heinous

sad, but oh so very true.

cfront was kinda a nice toy 'round '85.

C++ is right up there with collosal disasters.




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

* Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26  3:10     ` Boyd Roberts
@ 2001-04-26  7:29       ` matt
  2001-04-26  8:24         ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: matt @ 2001-04-26  7:29 UTC (permalink / raw)
  To: Boyd Roberts

Hello Boyd,

BR> C++ is right up there with collosal disasters.
I wonder what C++0x will bring




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




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

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26  7:29       ` Re[4]: " matt
@ 2001-04-26  8:24         ` Boyd Roberts
  2001-04-26 10:32           ` nospam
  0 siblings, 1 reply; 13+ messages in thread
From: Boyd Roberts @ 2001-04-26  8:24 UTC (permalink / raw)
  To: 9fans

From: "matt" <matt@proweb.co.uk>
>
> BR> C++ is right up there with collosal disasters.
> I wonder what C++0x will bring

core dumps i'd say.  out by 0x0 errors.




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

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26  8:24         ` Boyd Roberts
@ 2001-04-26 10:32           ` nospam
  2001-04-26 13:20             ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: nospam @ 2001-04-26 10:32 UTC (permalink / raw)
  To: 9fans

If not C++, then what? SmallTalk, Dylan, C#, Eiffel, others?

do we lose more than we gain?
if we cannot build it (simply) in C, is it worth building at all?

Not wanting to divert 9fans off topic, but what do Plan9 gurus
feel(choose) collectively about choice of language for implementation
of superstructures layered on Plan9?


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

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 10:32           ` nospam
@ 2001-04-26 13:20             ` Boyd Roberts
  0 siblings, 0 replies; 13+ messages in thread
From: Boyd Roberts @ 2001-04-26 13:20 UTC (permalink / raw)
  To: 9fans

> If not C++, then what? SmallTalk, Dylan, C#, Eiffel, others?

limbo




^ permalink raw reply	[flat|nested] 13+ 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-27  9:14     ` Randolph Fritz
  1 sibling, 0 replies; 13+ 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] 13+ 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-27  9:14     ` Randolph Fritz
  1 sibling, 0 replies; 13+ 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] 13+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 23:06 ` Boyd Roberts
@ 2001-04-26 23:28   ` Andrey A Mirtchovski
  2001-04-26 23:43     ` Boyd Roberts
  2001-04-27  9:14     ` Randolph Fritz
  0 siblings, 2 replies; 13+ 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] 13+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
  2001-04-26 13:48 presotto
@ 2001-04-26 23:06 ` Boyd Roberts
  2001-04-26 23:28   ` Andrey A Mirtchovski
  0 siblings, 1 reply; 13+ 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] 13+ messages in thread

* Re: Re[4]: [9fans] Design choice is C preprocessor
@ 2001-04-26 13:48 presotto
  2001-04-26 23:06 ` Boyd Roberts
  0 siblings, 1 reply; 13+ 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] 13+ messages in thread

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-23 22:12 [9fans] Design choice is C preprocessor Andrew Pochinsky
2001-04-25  1:34 ` Boyd Roberts
2001-04-25  8:15   ` Re[2]: " matt
2001-04-26  3:10     ` Boyd Roberts
2001-04-26  7:29       ` Re[4]: " matt
2001-04-26  8:24         ` Boyd Roberts
2001-04-26 10:32           ` nospam
2001-04-26 13:20             ` Boyd Roberts
2001-04-26 13:48 presotto
2001-04-26 23:06 ` Boyd Roberts
2001-04-26 23:28   ` Andrey A Mirtchovski
2001-04-26 23:43     ` Boyd Roberts
2001-04-27  9:14     ` Randolph Fritz

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).