C++

Anything QL Software or Programming Related.
User avatar
Whopper
Brittle Membrane
Posts: 105
Joined: Tue Oct 24, 2017 4:04 pm

C++

Postby Whopper » Wed Jan 30, 2019 7:17 pm

Hi All,

Stupid question time again.

Is there a C++ compiler for the QL?

Whopper.


You woke me for THAT!!!
User avatar
tofro
QL Wafer Drive
Posts: 1523
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: C++

Postby tofro » Wed Jan 30, 2019 7:48 pm

Simple answer: No.

Maybe the best bet would be to try and adapt the gcc 2.95 patches to a (more) modern gcc (a challenge in itself) and extend them to g++ (another significant challenge). 68k support in recent gcc/g++ has become worse and worse due to lack of interest and maintainers.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Whopper
Brittle Membrane
Posts: 105
Joined: Tue Oct 24, 2017 4:04 pm

Re: C++

Postby Whopper » Thu Jan 31, 2019 5:12 pm

Tobias,

Thanks for this. I thought that this would be the case, but it would have made a project much easier with C+. Still never mind I suppose assembler will bo.

Whopper


You woke me for THAT!!!
Derek_Stewart
QL Wafer Drive
Posts: 1234
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: C++

Postby Derek_Stewart » Mon Feb 11, 2019 9:09 pm

Hi,

I have always wanted a C++ compiler on the QL.

C++ was developed from C into C++ precursor called C wth Classes, I was reaserching how this process was done, with view to update C68, to C68 with Classes.

But C68 is an old ANSI C compiler, so maybe C68 wants to updated to tge latest ANSI C Standard.


Regards,

Derek
stevepoole
Trump Card
Posts: 187
Joined: Mon Nov 24, 2014 2:03 pm

Re: C++

Postby stevepoole » Tue Feb 12, 2019 6:50 am

Hi,

Do we really need classes ? I use C++, but get by without them !
C++ is better than C, but mainly as it cures some C problems, such as poor input and output operators.
And as it is not an interpreted language, bug-finding can be pretty horrendous.

Why use C++ at all ? The simple answer is that it is blisteringly fast on a PC.... ( hundreds of times faster than SMSQ/E on QPC2 )
But how would it perform on a 68000-based motherboard ?

Regards,
Steve Poole.


polka
Bent Pin Expansion Port
Posts: 96
Joined: Mon Mar 07, 2011 11:43 am

Re: C++

Postby polka » Tue Feb 12, 2019 12:11 pm

Hi, I agree !

Starting to program with Fortran 2 then Fortran 4 and Fortran 77, and also with several Basic dialects, when in the meantime I discovered C (and Forth), I found that I had the right powerful tools - and even before C++, on the machines that I used professionnaly (that were all more or less non-standard), I saw the (plain) C compilers get faster all the time. Then I rather jumped over C++ to adopt Ada (on big real time projects) and then Jbed, a true object oriented Java (sporting not "priorities" but "earliest deadline first" - the best way to manage a huge number of objects within a real time application).

But for my eighties old QLs, a C68 compiler will still do, IMO.

Polka


User avatar
Whopper
Brittle Membrane
Posts: 105
Joined: Tue Oct 24, 2017 4:04 pm

Re: C++

Postby Whopper » Tue Feb 12, 2019 6:31 pm

Hi All,
I was wanting to use C++ classes for multiple LCD screens. That is just so much easier with C++. Using assembler (or C) I have to maintain two, or more, separate drivers for the screens. It can be done, just more messy and harder to maintain than with classes.

Whopper.


You woke me for THAT!!!
User avatar
NormanDunbar
Super Gold Card
Posts: 678
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: C++

Postby NormanDunbar » Tue Feb 12, 2019 10:19 pm

Seem to remember that classes are "just" structs with a fancy name. I would imagine there is probably a way ti use structs in a classy sort of way with C68?

Anyway, don't let Tony Tebby hear you mention classes or objects as I seem to remember him slagging them off big time in an article in QL Today.


Cheers,
Norm.


Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
pjw
Gold Card
Posts: 487
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: C++

Postby pjw » Tue Feb 12, 2019 11:26 pm

NormanDunbar wrote:Anyway, don't let Tony Tebby hear you mention classes or objects as I seem to remember him slagging them off big time in an article in QL Today.
Wasnt that Linus Torvalds? I know he was pretty abusive about c++. Thought the best thing about it was that it'd keep crappy programmers away from C! ;) (Not my words :!: )


Per
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
Derek_Stewart
QL Wafer Drive
Posts: 1234
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: C++

Postby Derek_Stewart » Wed Feb 13, 2019 8:28 am

Hi,

Reading all the comments, there seems to a consensus, that C++ is not a good idea.

But how about trying to bring C68 upto the current ANSI C standard, C11 standard is called ISO/IEC 9899:2011.


Regards,

Derek

Who is online

Users browsing this forum: No registered users and 5 guests