Welcome, Guest. Please login or register.

Author Topic: Native Blitz Basic for AROS ever?  (Read 5168 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline persia

  • Hero Member
  • *****
  • Join Date: Sep 2006
  • Posts: 3753
    • Show only replies by persia
Re: Native Blitz Basic for AROS ever?
« Reply #14 from previous page: June 15, 2010, 12:29:22 PM »
Worse still is the non-objective version of C++, that is ordinary C++.  All attempts to implement objects in C fail because C is, in many ways, antagonistic towards the idea.
[SIGPIC][/SIGPIC]

What we\'re witnessing is the sad, lonely crowing of that last, doomed cock.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Native Blitz Basic for AROS ever?
« Reply #15 on: June 15, 2010, 01:33:27 PM »
Quote from: persia;564671
Worse still is the non-objective version of C++, that is ordinary C++.

I couldn't disagree more strongly, and neither could the software industry as a whole. C++ is so widely used because it is a 99% compatible superset of C89 with additional features useful for building large applications (OOP, generic programming etc).

Syntactically, C++ is far cleaner than Objective C/C++ although the ugliest syntactical aspect (template) is pretty bad. That aside, it introduces new syntax primarily through additional keywords. It doesn't, unlike Objective C, radically redefine the meaning of existing C syntax when used within the context of classes.

Lastly, absolutely no major company uses Objective-C save for apple. Which doubtless suits their business model just fine.

Quote
All attempts to implement objects in C fail because C is, in many ways, antagonistic towards the idea.

Creating runtime polymorphic objects in C is pretty straightforward if you don't mind function pointers. I used to do that a fair bit before moving to C++.
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Native Blitz Basic for AROS ever?
« Reply #16 on: June 15, 2010, 01:49:23 PM »
Clam down guys! I happen to have used both C++ and Obj-C... When I first use Obj-C it was a horrible verbose mess of a language, which seemed to lack the more obvious design of C++, but after using Obj-C a lot, I came to undertand the design goals of the designers. I now think that C++ is the more logical evolution of C, but that Obj-C is a purer vision of what an OOP programming language is supposed to be. Neither is a better language, they simply have different design goals.

Personally I now prefer Obj-C, as I fid it easier to come back to a project after not lookin at it for a while and get back into it without having to reread my design notes!

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show only replies by bubblebobble
    • http://www.hd-rec.de
Re: Native Blitz Basic for AROS ever?
« Reply #17 on: June 15, 2010, 01:57:26 PM »
Is there an Objective C compiler for the Amiga (AROS) at all?

Many aspects of a programming language depend on the degree of "being-used-to", so an objective comparism is very hard.
What counts at the end is how fast you can achive your goal, how stable/fast the result is and how maintainable the source code is.
This mainly depends on the IDE, Quality of Compiler, Runtime and how well the concept of the language matches the requirments. (e.g. Scripting vs. small vs. mid vs. large projects)
« Last Edit: June 15, 2010, 02:05:06 PM by bubblebobble »
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Native Blitz Basic for AROS ever?
« Reply #18 on: June 15, 2010, 02:54:32 PM »
Well, GCC supports Objective C as far as I know. I haven't looked into it for a long time though. Objective-C v2.x is developed and maintained by apple but as far as I know is still open.
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Native Blitz Basic for AROS ever?
« Reply #19 on: June 15, 2010, 02:55:58 PM »
Quote from: bubblebobble;564679
Is there an Objective C compiler for the Amiga (AROS) at all?

Many aspects of a programming language depend on the degree of "being-used-to", so an objective comparism is very hard.
What counts at the end is how fast you can achive your goal, how stable/fast the result is and how maintainable the source code is.
This mainly depends on the IDE, Quality of Compiler, Runtime and how well the concept of the language matches the requirments. (e.g. Scripting vs. small vs. mid vs. large projects)
AROS uses gcc which supports Obj-C compilation... But AFAIK AROS has no Obj-C runtime... So I expect it can't be used at this time :(

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Native Blitz Basic for AROS ever?
« Reply #20 on: June 15, 2010, 03:30:01 PM »
Quote from: bloodline;564677
Clam down guys! I happen to have used both C++ and Obj-C... When I first use Obj-C it was a horrible verbose mess of a language, which seemed to lack the more obvious design of C++, but after using Obj-C a lot, I came to undertand the design goals of the designers.

I do understand the design aims of Objective-C, I just think it's a hideous abortion of a language, especially as a superset of C.

Even the most basic OO operations have a syntax a drunken alien could not have made a worse hash of. Instantiating an object on the free store:
Code: [Select]
Foo* foo = [[Foo alloc] init];
The left hand side of the above assignment is C, right hand side is... gibberish.

Or, in v2 parlance:

Foo* foo = [Foo new];

A bit better, but what the feck is with the square bracket syntax?

Now, in C++
Code: [Select]
Foo* foo = new Foo();
The only unusual thing above from a C perspective is operator new.

Quote
I now think that C++ is the more logical evolution of C, but that Obj-C is a purer vision of what an OOP programming language is supposed to be. Neither is a better language, they simply have different design goals.

I wouldn't call either language an evolution of C. They are both supersets that aim to provide support for paradigms other than basic procedural programming. C++ gives you a strongly typed OOP model with a wide gamut of OOP features many other languages have shied away from (things like multiple inheritance and operator overloading spring to mind), generic programming and metaprogramming, but comparatively weak support for reflective programming. From this we get strongly typed, compile-time dominated optimisation that leads to efficient code but with some limitations on runtime flexibility.

Objective-C brings what I'd define as "narrow" OOP, akin to the Java model of singular inheritance with interfaces and reflection. From this we get a somewhat weaker typed system with emphasis on runtime flexibility rather than performance. Having runtime loadable classes and the like is certainly nice.

Both are decent aims; my argument is purely about the syntax. Objective-C's OOP syntax is simply alien if you come from a C background. One cannot claim with any credibility that resembles traditional C.

Consider a simple C function used as an interface to some structure to discourage direct poking about:
Code: [Select]
struct Foo {
  int bar;
};

int Foo_getBar(const struct Foo* foo)
{
  return foo->bar;
}
In C++, you might have reworked Foo as a class and have a simple inline getter:

Code: [Select]
class Foo
{
  private:
    bar;

  public:
    int getBar() const
    {
      return bar;
    }
};

The basic C function syntax is still perfectly recognisable within the class context. The only unusual thing above is the const qualifier for the code block which provided a guarantee that calling this method will not change the instance of the class. In the end, a nice simple method that will always be optimized away by the compiler to a safe, read-only access to the member value 'bar';

Then we get Objective-C (there may be a few errors here, I haven't used it for years):
Code: [Select]
@interface Foo {
    int bar;
}
 
-(int)getBar;
@end
There's already a fair degree of WTF going on here, but we aren't done yet since as you don't generally have simple inline methods, you must implement your interface elsewhere:
Code: [Select]
@implementation Foo
-(int)getBar
{
  return bar;
}
@end
So, the class to which a member function belongs is delimited with '@', the indication that the function is not an instance method but a class method is the '-' prefix, return type is parenthesised and none given for the arguments taken (if any). How could that look less like C, other than by removing the braces and elemental type names?

Lastly, where are the accessor levels? Even Java has those.

I'm sorry but as far as C goes, all of this is just an utter abortion.

Quote
Personally I now prefer Obj-C, as I fid it easier to come back to a project after not lookin at it for a while and get back into it without having to reread my design notes!
« Last Edit: June 15, 2010, 03:35:32 PM by Karlos »
int p; // A
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show only replies by bubblebobble
    • http://www.hd-rec.de
Re: Native Blitz Basic for AROS ever?
« Reply #21 on: June 15, 2010, 03:50:41 PM »
just curious if people start bashing me, in A/A++, this would be:

Code: [Select]

[b]Struct[/b] Foo {
   [b]int[/b] bar
}

[b]Function[/b] [b]int[/b] Foo::getBar(Foo *this) {
   [b]Return[/b] this.bar
}


I think this is intuitively understandable for all C/C++/Java coders, a very smooth integration of OOP in procedural programming.
WTF, were are the ;'s ?? Eeek ;)
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Native Blitz Basic for AROS ever?
« Reply #22 on: June 15, 2010, 03:54:00 PM »
Quote from: bubblebobble;564693
WTF, were are the ;'s ?? Eeek ;)


Like JS, in that regard. Personally, I rather like my statements to have some visible terminator.

Imagine what English would be like without the full stop...
int p; // A
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Native Blitz Basic for AROS ever?
« Reply #23 on: June 15, 2010, 03:57:04 PM »
Quote from: bloodline;564677

Personally I now prefer Obj-C, as I fid it easier to come back to a project after not lookin at it for a while and get back into it without having to reread my design notes!


this is the biggest problem i have in C++.there cant see a program flow easy, so i dislike to use OO

But can you tell what is in OBj-c better to see more easy the program flow ?
Or do you maybe mean for obj c you have a better editor ?
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Native Blitz Basic for AROS ever?
« Reply #24 on: June 15, 2010, 04:47:43 PM »
Quote from: bernd_afa;564695
this is the biggest problem i have in C++.there cant see a program flow easy, so i dislike to use OO

But can you tell what is in OBj-c better to see more easy the program flow ?
Or do you maybe mean for obj c you have a better editor ?
Objective C does not try to add OOP to C... If you think about it like that you will see it as a horrible mess.

I prefer to see the Objective parts as a framework around which I can build my code (written using C).

Hmmm, rather the "Smalltalk" part of Obj-C provides the structure... The C part provides the detail...

This allows me to see the OOP nature separate from the algorithmic implementation :)

Offline nicholas

Re: Native Blitz Basic for AROS ever?
« Reply #25 on: June 25, 2010, 10:24:26 PM »
Quote from: Karlos;564694
Like JS, in that regard. Personally, I rather like my statements to have some visible terminator.

Imagine what English would be like without the full stop...

Arabic.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Native Blitz Basic for AROS ever?
« Reply #26 on: June 25, 2010, 10:34:43 PM »
Quote from: bloodline;564677
Clam down guys! I happen to have used both C++ and Obj-C... When I first use Obj-C it was a horrible verbose mess of a language, which seemed to lack the more obvious design of C++, but after using Obj-C a lot, I came to undertand the design goals of the designers. I now think that C++ is the more logical evolution of C, but that Obj-C is a purer vision of what an OOP programming language is supposed to be. Neither is a better language, they simply have different design goals.

Personally I now prefer Obj-C, as I fid it easier to come back to a project after not lookin at it for a while and get back into it without having to reread my design notes!

I have 23yrs programming experience, 14 of those as a professional.

Just a few of the languages I have under my belt are C, C++, various 8, 16 and 32bit Assembly languages, several variations on SQL, Ada, Pascal, several RAD tools you've never heard of and even Satan's own Visual Basic.

Enough to know that I can code. I can code very well. I can pick up new languages and concepts very quickly.

Obj-C is a hairdressers language!  I tried it, I tried it again and again and again.

It is ridiculously bad and it is completely ugly. The ugliest syntax i've ever seen in the wild!

Obj-C is akin to AMOS, except it's not as pretty.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Native Blitz Basic for AROS ever?
« Reply #27 on: June 25, 2010, 10:37:22 PM »
Quote from: Amiga_Nut;564573
I am [slowly] starting a couple of games but I wondered if there were any plans for AROS specific version of Blitz for some time in the future? One of the games I am writing would look awesome in super highres but even AGA is too slow on initial tests. But on a nice beefy x86 CPU it could work really nicely and give you at least 4x more viewing area improving the game a lot.

It would be nice to be able to write games for AROS in a similarly great language too like the old day, but Google didn't find anything promising.

http://www.sdlbasic.altervista.org/main/
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini