Back to the main site.
User Info
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sat 31 July, 2010, 23:53:08

Login with username, password and session length
Search:     Advanced search
News Box
SMF - Just Installed!

Key Stats
103 Posts in 73 Topics by 14 Members
Latest Member: Mikha
Home Help Search Login Register
Propellor and Ratchet Games  |  P&R Related  |  News  |  C++ vs. Python « previous next »
Pages: [1] Go Down Reply Print
Author Topic: C++ vs. Python  (Read 260 times)
Propellor
Propells it forwards.
Administrator

Not currently in-game.

Full Member
*****

Shmuptitude 1
Offline Offline

Posts: 19


View Profile
« on: Sun 24 January, 2010, 22:42:52 »
Reply with quote

Python is fun.

C++ is fast.

Unfortunately when you're pushing any real kind of calculations per second to get a decent frame rate speed quickly becomes necessary.

The main issue i've been running into when coding in C++ is the way that classes and struct work.

In python you can basically use classes for everything. Eve just as data types. Ok this is probably ad practice but it's fantastically neat as well. You can use constructors in order to initialise the data, subclass exsisting data types (used this to do a angle data type that had built in radian conversion functions and which automatically flipped back over to 0 when it went past 359) and add various mutator functions.

In other words its convienient.

In C++ to do anything of the sort you have to create a class that's wrapped in a struct. So you have a datatype that includes a  class.

Otherwise you'll run into serious problems when trying to change data (x = y, etc doesn't work).

BLAH.

Proper planning of classes / structures becomes far more important and far far more tedious. Especially when you get a small detail wrong and have to re-code everything. And then you run into silly requirements like structs data members not being able to be set outside of a functinnnodgndlifughdlkfguhdflih.

Python plox.

Just to give people a heads up of the stupid complexities of coding in real languages (lul.)

Also a heads up to the state of GLLife .. aka not compiling cos i'm rewriting colour code.

One day they'll make a proc that runs python native, and i will cry in happiness.
« Last Edit: Sun 30 May, 2010, 18:10:50 by Ratchet » Logged
Propellor
Propells it forwards.
Administrator

Not currently in-game.

Full Member
*****

Shmuptitude 1
Offline Offline

Posts: 19


View Profile
« Reply #1 on: Sun 24 January, 2010, 22:43:17 »
Reply with quote

Sorry for bad typing i am tired / bed.
Logged
Pages: [1] Go Up Reply Print 
« previous next »
Jump to:  

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Theme based on Serene Forest, Created by SoulGamerz.net | Buttons by Andrea