[comp.sys.mac.programmer] LSC++?

jamesm@sco.COM (James M. Moore) (03/04/89)

Have Symantec/Think announced any plans for Lightspeed C++?

-- 
** James Moore **
** Internet:  jamesm@sco.com **
** uucp:  {decvax!microsoft | uunet | ucbvax!ucscc | amd}!sco!jamesm **
** Nil clu no suim ar bith ag SCO ceard a bhfuil me ag scriobh anois. **

siegel@endor.harvard.edu (Rich Siegel) (03/05/89)

In article <1791@viscous.sco.COM> jamesm@sco.COM (James M. Moore) writes:
>Have Symantec/Think announced any plans for Lightspeed C++?

	At the Developer's Breakfast that we threw at MacWorld, Michael
Kahl gave a sneak preview of Object C, which will be provided in an upcoming
release.

R.
Rich Siegel
Staff Software Developer
THINK Technologies Division, Symantec Corp.
Internet: siegel@endor.harvard.edu
UUCP: ..harvard!endor!siegel
Phone: (617) 275-4800 x305

chuq@Apple.COM (Chuq Von Rospach) (03/07/89)

>Have Symantec/Think announced any plans for Lightspeed C++?

I don't think so. But they *have* been looking for C++ Beta sites on
CompuServe...



Chuq Von Rospach       -*-      Editor,OtherRealms      -*-      Member SFWA
chuq@apple.com  -*-  CI$: 73317,635  -*-  Delphi: CHUQ  -*-  Applelink: CHUQ
      [This is myself speaking. No company can control my thoughts.]

Signature quotes? We don't need no stinkin' signature quotes!

mce@tc.fluke.COM (Brian McElhinney) (03/09/89)

In article <1330@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes:
>In article <1791@viscous.sco.COM> jamesm@sco.COM (James M. Moore) writes:
>>Have Symantec/Think announced any plans for Lightspeed C++?
>
>	At the Developer's Breakfast that we threw at MacWorld, Michael
>Kahl gave a sneak preview of Object C, which will be provided in an upcoming
>release.

Why invent a new language?  Aren't you concerned about the acceptance of a
unique, non-standard language?  As much as I love LSC, the idea Object C gives
me pause.  There wouldn't be any other compiler on any other computer that
would compile my code.  (Or did you mean Objective C?  Nah...)

I'm aware of the problems with C++ (still evolving, very complex, etc), but
there are many C++ compilers, and more in development.  Apple started out with
this same approach (minimal changes to C; known as C--) and in the end switched
to an extended version of C++.

On the other hand, the idea is not all bad.  I assume from the name that
Object C will have just enough extensions to work with programs written in
Object Pascal (eg MacApp).  Certainly a wonderful thing!  It should also
resemble C to a greater extent than C++.  Could you post a short description?
 
 
Brian McElhinney
mce@tc.fluke.com

siegel@endor.harvard.edu (Rich Siegel) (03/09/89)

In article <7235@fluke.COM> mce@tc.fluke.COM (Brian McElhinney) writes:
>
>Why invent a new language?  Aren't you concerned about the acceptance of a

	Who said it was a new language? :-)

>Object C will have just enough extensions to work with programs written in
>Object Pascal (eg MacApp).  Certainly a wonderful thing!  It should also

	Correct. The way it exists now, it is to C what Object Pascal is
to Pascal. The implementation of Object C is also upward-compatible with
C++.

		--Rich



Rich Siegel
Staff Software Developer
THINK Technologies Division, Symantec Corp.
Internet: siegel@endor.harvard.edu
UUCP: ..harvard!endor!siegel
Phone: (617) 275-4800 x305

uucibg@sw1e.UUCP (3929]) (03/22/89)

In article <7235@fluke.COM> mce@tc.fluke.COM (Brian McElhinney) writes:
>
>Why invent a new language?  Aren't you concerned about the acceptance of a
>unique, non-standard language?  As much as I love LSC, the idea Object C gives
>me pause.  There wouldn't be any other compiler on any other computer that
>would compile my code.  (Or did you mean Objective C?  Nah...)
>
>I'm aware of the problems with C++ (still evolving, very complex, etc), but
>there are many C++ compilers, and more in development.  Apple started out with
>this same approach (minimal changes to C; known as C--) and in the end switched
>to an extended version of C++.
>
>On the other hand, the idea is not all bad.  I assume from the name that
>Object C will have just enough extensions to work with programs written in
>Object Pascal (eg MacApp).  Certainly a wonderful thing!  It should also
>resemble C to a greater extent than C++.  Could you post a short description?
> 

Just thought I'd mention some languages which are object-oriented, based upon
C, and *could* end up on the Mac if we Mac programmer types would start yelling
loud enough.  In general, all three of these languages are, for all intents and
purposes, variations of the same language.  They are:

Objective-C (Stepstone)
C_talk      (CNS)
Complete C  (Complete Computer Corp.)

All of these languages take the approach of adding encapsulation, inheritance,
and messaging for objects a la Smalltalk.  They don't go into all the other
blessings/curses of C++ like operator overloading (which I personally find to
be a blessing but your mileage may vary).  They all use weak typing of objects
(although Complete C and Objective-C allow for static typing of objects as
well ).  Weak typing means that you can try to send any message to any object
and the message sending protocal will figure out if the object knows how to
handle that message or not.

All of these languages don't currently exist on the Mac, although all of the
companies said something like "we're looking at porting to the Mac OS".  So
if we want to generate a bit more competition in the Mac marketplace then we
should get off our duffs and start hounding these folks...

Addresses are:

Objective-C (Stepstone)
The Stepstone Corporation
75 Glen Road
Sandy Hook, CT 06482
203-426-1875

C_talk      (CNS)
CNS, Inc.
7090 Shady Oak Road
Eden Prairie, MN 55344
612-944-0923

Complete C  (Complete Computer Corp.)
111 West 57th St. 
Suite 1400
New York, NY 10019
212-582-2635
(BBS Phone: 212-956-3545)

Why am I posting this?  (1) I think people might want to know about these
languages and (2) I want to use one of these languages on the Mac so I need
other screaming bodies to help me convince the companies that the Mac OS is
a viable market :-).

I'll be happy to *discuss* the differences between C++ and these languages
(and would in fact enjoy the opportunity), but please: no flames.


Brian R. Gilstrap                          Southwestern Bell Telephone
One Bell Center Rm 17-G-4                  ...!ames!killer!texbell!sw1e!uucibg
St. Louis, MO 63101                        ...!bellcore!texbell!sw1e!uucibg
(314) 235-3929
#include <std_disclaimers.h>

hearn@claris.com (Bob Hearn) (03/24/89)

In article <1405@sw1e.UUCP> uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) writes:
>I'll be happy to *discuss* the differences between C++ and these languages
>(and would in fact enjoy the opportunity), but please: no flames.

Hey, Brian, how's it going?  I don't know much about Objective-C, but I've
heard it's a dog, efficiency-wise, compared to C.  That it takes all the
SmallTalk ideas and forces them rather rudely into a C-like syntax.  Is this
true?  One thing I love about C++ is that it doesn't have to be (and in
fact in general isn't) any less efficient than C.  The object-oriented
stuff is there, if you want it.  You can even have classes and object
without any real (slow) message passing or dynamic type-checking, but then
virtual functions give you polymorphism if you need it, at a computational
cost no greater than if you did it the hard way with explicit table lookup.
As for operator overloading... I love it.  But it sure is easy to abuse.
What do these other languages give you that C++ doesn't?  And since C++ is
likely to become the new standard, once it gets well-enough defined, does
it matter?  BTW... I've heard rumors of a second-edition Stroustrup.  My
working references right now are Stroustrup and the papers he's written
since the book.  Is this up to date?

Bob Hearn
hearn@claris.com

uucibg@sw1e.UUCP (3929]) (04/06/89)

In article <9166@claris.com> hearn@claris.com (Bob Hearn) writes:
>Hey, Brian, how's it going?  I don't know much about Objective-C, but I've
Just a quick personal note and then onward:  Bob, it's going pretty well.
However, i've tried to mail to you several times and it bounces.  Drop me a
line and we'll catch up.


>...........................  I don't know much about Objective-C, but I've
>heard it's a dog, efficiency-wise, compared to C.  ......................

Well, there is dynamic lookup of functions at runtime, which is more costly
than dereferencing a pointer al a virtual functions.  There is not doubt
that C++ lets you program closer to the bleeding edge of the machine
However, as part of their hype, Stepstone mentions that there are currently
about 20 companies doing major development in Objective-C and that 15 or
so are real-time applications.

The message lookup is in assembly (one reason that Objective-C isn't on all
that many platforms yet) and it's very optimized.  This definitely means that
there are applications for which C++ is more appropriate.  However, I suspect
that method lookup is actually very fast.  All it involves is running a linked
listed of pointers and doing some longint comparisons (all you speed freaks
will run screaming I'm sure :-)

Note also that Objective-C *does have static binding*.  This means (as far
as I know) that you can have the equivalent of virtual functions in
Objective-C (and non-virtual ones as well).  I can't be positive on this since
I haven't looked into the static binding too deeply yet (waiting for a copy
of the new manual and a chance to play with the new version of the compiler).


>.................................................  That it takes all the
>SmallTalk ideas and forces them rather rudely into a C-like syntax.  Is this
>true?  ................
I don't find that to be true at all.  It certainly takes the Smalltalk ideas
and grafts them onto C.  Since C is basically portable assembly and object-
orientedness is rather high-level, you do have a bit of an adjustment to
make.  Personally, I find it beats C hands down in the elegance and simplicity
areas.

>.....  One thing I love about C++ is that it doesn't have to be (and in
>fact in general isn't) any less efficient than C.  ............
This is definitely true.  However, Objective-C is only less so as far as
weakly-typed object-oriented code is concerned.
Objective-C is a superset of C so you only pay in speed when you send messages
(you can code your methods intirely in vanilla C if you feel like it).  Since
it now has static binding, you actually get the best of both worlds.  You can
develop in a weakly typed environment which lets you prototype quickly and
then go back and make the stuff statically typed to improve efficiency as
needed.

>.................................................  The object-oriented
>stuff is there, if you want it.  You can even have classes and object
>without any real (slow) message passing or dynamic type-checking, ........

same in Objective-C

>................................................................, but then
>virtual functions give you polymorphism if you need it, at a computational
>cost no greater than if you did it the hard way with explicit table lookup.

same in Objective-C, with the advantage of using dynamic lookup as needed
and when speed is not critical (you know the saying about 80% of the time
being spend in 20% of the code).

>As for operator overloading... I love it.  But it sure is easy to abuse.

Yep.  My sentiments exactly.

>What do these other languages give you that C++ doesn't?  ................

What it gives you:
-----------------
dynamic lookup
much greater polymorphism
a simpler, more elegant semantics
faster prototyping

What it doesn't give you:
------------------------
operator overloading (something of a mixed blessing :-)
the more flexible declaration locations
anonymous unions (isn't this in ANSI C?)
default function parameter values

There are others that will depend upon your compiler being ANSI (since
Objective-C is a translator front like cfront) such as function prototypes.

>........................................................  And since C++ is
>likely to become the new standard, once it gets well-enough defined, does
>it matter?  ...............

Unfortunately, it probably doesn't matter.  I say unfortunately because I'm
not convinced that C++ is the way to go. NOTE! that I'm also not convinced
that Objective-C is the way to go.  However, I don't think that other
object-oriented languages are getting fair evaluations in comparison to
C++ (I wish I could get my hands on Eiffel, CLOS <and a list to run it :-)>,
and others).

>..........  BTW... I've heard rumors of a second-edition Stroustrup.  My
>working references right now are Stroustrup and the papers he's written
>since the book.  Is this up to date?

As you probably already know by now, cfront 2.0 has been announced.  I haven't
read the article in "Unix Today!" yet but it apparently includes multiple
inheritance (and I would hope parameterized types).

>
>Bob Hearn
>hearn@claris.com

Well, everybody, jump on in, but please no flames.

Thanks,

Brian R. Gilstrap                          Southwestern Bell Telephone
One Bell Center Rm 17-G-4                  ...!ames!killer!texbell!sw1e!uucibg
St. Louis, MO 63101                        ...!bellcore!texbell!sw1e!uucibg
(314) 235-3929
#include <std_disclaimers.h>

padraig@ut-emx.UUCP (Padraig Houlahan) (04/07/89)

In article <1465@sw1e.UUCP> uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) writes:
~In article <9166@claris.com> hearn@claris.com (Bob Hearn) writes:
~>Hey, Brian, how's it going?  I don't know much about Objective-C, but I've
~Just a quick personal note and then onward:  Bob, it's going pretty well.


(This may not be the best group for posting this, however since my
eventual concern is with developing code on the mac I'll go ahead.)

My initial impressions after playing around with C++ is that apart from
a few extra features, there is very little to be gained in using it
instead of C. By this I mean a good top down structure (to me at least)
would appear to have 90% of the benefits that an object oriented approach
claims.

Am I missing something obvious?

Regards,

Padraig Houlahan.

hearn@claris.com (Bob Hearn) (04/10/89)

From article <11822@ut-emx.UUCP>, by padraig@ut-emx.UUCP (Padraig Houlahan):
> In article <1465@sw1e.UUCP> uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) writes:
> ~In article <9166@claris.com> hearn@claris.com (Bob Hearn) writes:
> ~>Hey, Brian, how's it going?  I don't know much about Objective-C, but I've
> ~Just a quick personal note and then onward:  Bob, it's going pretty well.
> 
> 
> (This may not be the best group for posting this, however since my
> eventual concern is with developing code on the mac I'll go ahead.)
> 
> My initial impressions after playing around with C++ is that apart from
> a few extra features, there is very little to be gained in using it
> instead of C. By this I mean a good top down structure (to me at least)
> would appear to have 90% of the benefits that an object oriented approach
> claims.
> 
> Am I missing something obvious?
> 
> Regards,
> 
> Padraig Houlahan.

I've only been using C++ for a few months, and now I've quit my job to
form my own company, and I have to go back to C.  I'm finding it very
difficult.  Surprisingly, what I miss most are inline functions and
operator overloading.  Classes make the language complicated, and their
very useful, but I'd sooner do without them than inline funcs & operator
overloading.

Bob Hearn
hearn@claris.com

fischer@iesd.dk (Lars P. Fischer) (04/11/89)

From article <11822@ut-emx.UUCP>, by padraig@ut-emx.UUCP (Padraig Houlahan):
> My initial impressions after playing around with C++ is that apart from
> a few extra features, there is very little to be gained in using it
> instead of C. By this I mean a good top down structure (to me at least)
> would appear to have 90% of the benefits that an object oriented approach
> claims.
> 
> Am I missing something obvious?

One of the benefits of OO is the ease of adding functionality to a
program step by step. Additions are much easier to add once you have
the basic class hierarchy in place.

Also, OO makes it *much* easier to re-use code, and to provide good
libraries. Take a look a GNU libG++. It has a String type that handles
memory allocation, index checking, regex's, etc, etc. Building this
with ordinary C would be *possible*, but it would be difficult, and it
would be difficult to use. With C++ I don't have to worry about using
a String in a wrong way. I can't.

GNU libG++ also has container classes, etc, etc. Note that, when you
use hash tables from the standard Unix library, there is no type
checking, and worse, there is no way to have more than one hash table
in a program. With GNU libG++ I can have any number of hash tables, with
full typecheking. Again, this might be *possible* to do in C, but, for
all these years, no one have done it. C++ is all new, and it's been
done already. This *could* be a hint....

With OO, it is easy to provide different implementations of something,
based on different data structure, but with the same interface.
Example: I just made an experiment with an application I'm writing. It
uses hash tables, but I wanted to know if AVL trees would be faster. To
test that, I had to change *one single declaration* and to generate a
new class using a standard utility (one command). That's all. Do that
in C!

Don't get me wrong. I was a C hacker, and have written a good deal of
C code. C is not bad. Still, I would hate to go back.

/Lars
--
Copyright 1989 Lars Fischer; you can redistribute only if your recipients can.
Lars Fischer,  fischer@iesd.dk, {...}!mcvax!iesd!fischer
Any sufficiently advanced technology is indistinguishable from magic.
			-- Arthur C. Clarke