NO

Author Topic: Object C  (Read 13061 times)

Mordred

  • Guest
Object C
« on: November 13, 2005, 04:39:12 PM »
Portable Object C is a compiler which translates Object-C code into plain C
code:
http://users.pandora.be/stes/compiler.html

It currently supports lcc-win32 (the evil rival of PellesC):
ftp://ftp.simtel.net/pub/simtelnet/win95/prog/oc2215l.zip

Could it be "tweaked" a little bit so it could support PellesC??, that would be just great..
It would stop people from complaining that PellesC doesn't support OOP.

Mordred.

Gerome

  • Guest
Re: Object C
« Reply #1 on: November 13, 2005, 09:25:16 PM »
Hello,

Quote from: "Mordred"

It currently supports lcc-win32 (the evil rival of PellesC):

Mordred.


At 1st, i don't think LCC-Win32 is Evil NOR it is a rival of PellesC since they are BOTH issued from the LCC compiler!

Both have their own potential, LCC is able to compile old C style proggies vs PellesC fails on compiling old C progz, LCCWin32 has missing C99 features that PellesC has, PellesC has missing support for AT&T syntax that LCC/GCC has and so on... So where is the Evil ?
Nowhere!

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Object C
« Reply #2 on: November 14, 2005, 12:04:48 AM »
Quote from: "Mordred"
Could it be "tweaked" a little bit so it could support PellesC??, that would be just great..
It would stop people from complaining that PellesC doesn't support OOP.

I'm sure it can. I will look at it when I can find the time - unless someone else is really interested...?

Pelle
/Pelle

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Object C
« Reply #3 on: November 14, 2005, 12:06:32 AM »
Quote from: "Gerome"
...PellesC fails on compiling old C progz...

Do you have a (small) example?

Pelle
/Pelle

Gerome

  • Guest
Re: Object C
« Reply #4 on: November 14, 2005, 01:56:44 PM »
Hello,

Code: [Select]

int Test(argc, argv)
int argc;
char **argv;
{
return 0;
}


Quote from: "Pelle"
Quote from: "Gerome"
...PellesC fails on compiling old C progz...

Do you have a (small) example?

Pelle

Mordred

  • Guest
Object C
« Reply #5 on: November 14, 2005, 05:14:44 PM »
Yeah, both are based on lcc, but lcc-win32 is commercial where PellesC is
free  :D , with a much better IDE of course...

Personally, I think that Objective-C is better than C++ (especially if it's compiled with PellesC)

By the way, I forgot that it's open-source.. You can download the whole
(C source) form here: ftp://ftp.simtel.net/pub/simtelnet/win95/prog/oc2316s.zip

Mordred.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Object C
« Reply #6 on: November 14, 2005, 08:47:37 PM »
Quote from: "Gerome"

Code: [Select]

int Test(argc, argv)
int argc;
char **argv;
{
return 0;
}


Well, it works here...

Pelle
/Pelle

Gerome

  • Guest
Re: Object C
« Reply #7 on: November 14, 2005, 10:16:34 PM »
Hi,

Quote from: "Pelle"
Quote from: "Gerome"

Code: [Select]

int Test(argc, argv)
int argc;
char **argv;
{
return 0;
}


Well, it works here...

Pelle


Even without any warning ?
Not sure...

kobold

  • Guest
Object C
« Reply #8 on: November 15, 2005, 07:13:18 PM »
Why do not make a objective c compiler out of PellesC  :mrgreen:
By the way: where will objetive c be used nowadays?

Mordred

  • Guest
Object C
« Reply #9 on: November 15, 2005, 08:05:14 PM »
Objective-C is a very clean language (unlike C++), this is a real superset of
C, with no bloat.
This is an article which defines Object-C (wikipedia):
http://en.wikipedia.org/wiki/Objective-C

I don't know.. Objective C support could be added by using the Portable Object compiler (see above), which translates Objective C Code to Plain C.
It might need some tweaking, but if it works with lcc-win32 - then it should
work on PellesC with little modifications, because both are based on LCC (as
Gerome said).

I tried the compiler with other systems, like watcom C, and it does a perfect translation, and it supports Garbage collection using the Boehm method.

Mordred.

Virulent

  • Guest
Object C
« Reply #10 on: January 14, 2006, 05:43:21 PM »
Sorry to bring back such an old topic, but, yes, having object support in Pelles C would be amazing. This is something I'd really look forward to having! :D

kobold

  • Guest
Object C
« Reply #11 on: January 14, 2006, 07:45:40 PM »
A string datatype would be good too, but non-standard compliant. : (

.oO(PellesC as a D or objective C compiler?)

maxhrk

  • Guest
Object C
« Reply #12 on: March 26, 2006, 12:29:40 AM »
Sorry to bump this old thread up but i want to say I am looking forward to Objective C if it is possible to be added to Pelle C.

Thanks! :D

 :oops:

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Object C
« Reply #13 on: March 27, 2006, 07:51:30 PM »
I have looked at it, but I'm not convinced.

C++ is out of the question - I don't like it, and it's just too much work trying to make a conforming compiler. As I have said before, adding "half" a language is useless - either you make a full implementation or you don't do it at all.

That said, there seem to be several "C with classes" available - not only Objective C. None of them seems bigger or better than anyone else. None of them are "standard", which also makes them pretty useless (to me at least).

One common approach is to use a "preprocessor" that emits C code, which can be compiled using a normal C compiler. This approach should work for, say, Objective C too - but I'm reasonably sure the preprocessor shouldn't be part of the Pelles C distribution.

Pelle
/Pelle

Mordred

  • Guest
Object C
« Reply #14 on: April 02, 2006, 06:42:57 PM »
Wow.. This thread is very old and I didn't expect to see it
at the top now...

Actually.. It is a preprocessor, and it just could be integrated into
PellesC (the best way is a plugin)..

But I don't think it really matters now, all these OOP C's (Including Object-C)
are in a 'slow death' process right now, being replaced by newer languages
like C# and Python. For that reason I see that it's pretty pointless to add
support for it now.

So I think that Pelle should forget about this, it's not important anymore..

Only one thing is sure: Programming languages will come and go, but 'C'
will stay 'C' (For a long time, I guess)