Welcome, Guest. Please login or register.
May 26, 2013, 08:23:27 am

Login with username, password and session length
Members
Total Members: 488
Latest: Wimmie
Stats
Total Posts: 7309
Total Topics: 1178
Online Today: 2
Online Ever: 229
(April 05, 2011, 09:10:50 am)
Users Online
Users: 0
Guests: 2
Total: 2
Permissions

A Squeakyduck Design product
Pages: [1]
Print
Author Topic: Is Cobra Object Oriented?  (Read 1082 times)
SopiSoft
Newbie
*
Offline Offline

Posts: 7


NIGHTC0D3R


WWW
« on: January 19, 2007, 01:12:58 am »

Hi guys,

I forgot about this: Does Cobra support Object Oriented Programming?

Cheerz!  Cool
Logged
Sveinung
Cobra Owner (Pro)
Jr. Member
*
Offline Offline

Posts: 166



« Reply #1 on: January 19, 2007, 06:50:30 am »

Nope

Sveinung
Logged
Steve
Cobra Owner (Pro)
Full Member
*
Offline Offline

Posts: 553



« Reply #2 on: January 19, 2007, 06:46:27 pm »

Which is a good thing!   Grin

Personally, I've used procedural languages too long to really take to OOP.
Logged

PC: Intel Core Duo, 2.53 Ghz, 3Gb RAM, Intel G45 Express, Windows Vista Home Premium

Notebook: Samsung NC10, Intel Atom N270, 1.60Ghz, 2Gb RAM, Mobile Intel 945 Express, WindowsXP Home Edition.
GrahamK
Administrator
Hero Member
*****
Offline Offline

Posts: 2031


Cobrabytes
« Reply #3 on: January 19, 2007, 06:56:13 pm »

OK, official line Wink

Not at the moment...... BUT....
Cobra is designed to adapt, and have OO functionality in the future. If you want to know what I mean look at how Turbo Pascal gained features to become Object Pascal.

No change of name for Cobra though, and even when OOP comes in you'll be free to use procedural code, or OOP, or (maybe!) both.
Typical style of code when Cobra gains its oop will be mainly in this area
Code:
type mytype = typeof(athing)
    x,y,z:integer;
    speed:integer;private
    procedure GoUP(value:integer)
    begin
        y=y-speed
        speed = value
    end
endtype

var
 atype:mtype
begin
  atype.goUp(20)
end
 

But don't hold me to this, as it's not in there yet (and won't be for a while, certainly after Cobra3D)
« Last Edit: January 19, 2007, 06:58:06 pm by GrahamK » Logged
Steve
Cobra Owner (Pro)
Full Member
*
Offline Offline

Posts: 553



« Reply #4 on: January 19, 2007, 08:19:55 pm »

I'd prefer to see a DirectX module before an OOP one.
Logged

PC: Intel Core Duo, 2.53 Ghz, 3Gb RAM, Intel G45 Express, Windows Vista Home Premium

Notebook: Samsung NC10, Intel Atom N270, 1.60Ghz, 2Gb RAM, Mobile Intel 945 Express, WindowsXP Home Edition.
GrahamK
Administrator
Hero Member
*****
Offline Offline

Posts: 2031


Cobrabytes
« Reply #5 on: January 19, 2007, 09:29:08 pm »

Oop 'may' well make it easier for me to do DX Wink

State of what happens with DX, is VERY dependent on how Vista goes, both in terms of uptake, and general public impressions of vista.
Logged
Steve
Cobra Owner (Pro)
Full Member
*
Offline Offline

Posts: 553



« Reply #6 on: January 19, 2007, 10:24:11 pm »

Just one point about allowing people to use either OOP or procedural.  BlitzMax has this approach but everybody now uses OOP - so if you post code to help someone that has an 'old syntax' Cobra that's no help at all - especially in complex code.
Logged

PC: Intel Core Duo, 2.53 Ghz, 3Gb RAM, Intel G45 Express, Windows Vista Home Premium

Notebook: Samsung NC10, Intel Atom N270, 1.60Ghz, 2Gb RAM, Mobile Intel 945 Express, WindowsXP Home Edition.
GrahamK
Administrator
Hero Member
*****
Offline Offline

Posts: 2031


Cobrabytes
« Reply #7 on: January 19, 2007, 10:31:21 pm »

As I say, it's not set in stone (or even written yet), so I'll cross that bridge when I get to it Wink Not worth worrying about as yet.
Logged
Pages: [1]
Print
Jump to: