Pages: 1 2
Author Topic: GM's Data Structures  (117,411 Views)
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #15 Posted on: September 01, 2011, 06:38:42 PM
Quote from: The 11th plague of Egypt on August 31, 2011, 12:13:13 PMI'm writing a Qt project right now, and I assure you that C++ data structures are WAY more difficult to learn and use than the GM's counterpart.
Um.

I literally see no difference.  Instead of:
var l = list_create();
list_add(l, 1);

you have:
vector<variant> l;
l.add(1);

Which is a whole lot easier to understand, in my opinion.  The only difference is an OO API versus a functional API, and an OO API makes a whole lot more sense in this instance.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #16 Posted on: September 02, 2011, 04:09:21 AM
Actually, you don't need the <variant>. You can use vector, vector<>, or vector<variant>; they're all the same.

But I can see how functions, technically using no types, could be easier for the GM crowd to understand. Even if they're far too verbose for the rest of us.

I will keep that in mind, though, plague.
Offline (Unknown gender) The 11th plague of Egypt

Member
Joined: Dec 2009
Posts: 274
View profile
Reply #17 Posted on: September 02, 2011, 01:25:04 PM
I'm just saying I can handle both GML and C++ synthax, but a mix of the two could be tricky and counter-intuitive if rushed through.

Thank you for caring.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #18 Posted on: September 02, 2011, 03:23:24 PM
Quote from: Josh @ Dreamland on September 02, 2011, 04:09:21 AM
But I can see how functions, technically using no types, could be easier for the GM crowd to understand. Even if they're far too verbose for the rest of us.
In all honesty, I think that they're easier for the advanced GM users, who know how to use them well, but not as much for the newer users that haven't used data structures before.  Either way, I suppose that it's good to have a functional API as well as an OO one.
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #19 Posted on: September 02, 2011, 06:20:22 PM
It's really not very functional when you update the data structures in-place. I'd call it procedural.
Pages: 1 2