|
Necavi
|
 |
« on: July 09, 2014, 06:17:17 PM » |
|
I'm not sure how many of you have found out about it thus far, but Sourcemod 1.7 includes a new way of writing parts of sourcemod plugins, basically the beginnings of an actual object oriented language: https://wiki.alliedmods.net/SourcePawn_Transitional_SyntaxWhen it gets a bit further along I plan to start a War3Source branch for SM1.7 which will switch as much as possible to use the new API. From what I understand, the changes are almost entirely compiler, not runtime, so it is quite possible that my 1.7 branch will run on 1.6 as long as it is compiled for 1.7.
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #1 on: July 10, 2014, 04:50:27 AM » |
|
Yeah I already heard of it, sounds really cool! Especially large projects like War3Source will benefit from it.
|
|
|
|
|
Logged
|
#war3source on gamesurge
|
|
|
|
-El Diablo
|
 |
« Reply #2 on: July 10, 2014, 08:38:53 AM » |
|
I wish they would go towards Pascal instead :p
Personally, I hate and love this change.
I hate having to learn new coding practices, love that it will eventually make programming easier in the long run.
|
|
|
|
|
Logged
|
|
|
|
Ownz
Developer
Administrator
Hero Member
    
Posts: 2368
chmod -R 777 *
|
 |
« Reply #3 on: July 10, 2014, 09:19:10 PM » |
|
other than a few signature improvements and weird syntaxes, I don't see anything really improved upon. its still manual memory management, and fake classes
but still not even close to C
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #4 on: July 10, 2014, 11:35:50 PM » |
|
Too true, but still it looks like it should be able to improve the readability of the code quite a bit.
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #5 on: July 11, 2014, 05:37:42 AM » |
|
Too true, but still it looks like it should be able to improve the readability of the code quite a bit.
I personally don't like that part. It may make it easier for you to read because your used to that kind of syntax. For all others.. we'll need lots of coaching!
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #6 on: July 12, 2014, 08:27:14 AM » |
|
Everyone that doesn't live in the past would be glad for such thing to happen. With 1.7 we will be able to do something like this: decl String:szName[64]; Race race = War3_GetRace(client); race.GetName(szName, sizeof(szName)); race.IsSkillUltimate(4);
Pre 1.7: decl String:szName[64]; new race = War3_GetRace(client); War3_GetRaceName(race, szName, sizeof(szName)); War3_IsSkillUltimate(race, 4);
I know this code does not make any sense, nonetheless the SM 1.7 version is much more readable.
|
|
|
|
« Last Edit: July 12, 2014, 08:29:29 AM by Revan »
|
Logged
|
#war3source on gamesurge
|
|
|
|
Necavi
|
 |
« Reply #7 on: July 12, 2014, 12:42:00 PM » |
|
Actually, it'll be closer to: Race race = client.race; String raceName = race.name; race.skills[4].isUltimate;
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #8 on: July 14, 2014, 06:07:55 PM » |
|
Bit of a hold on this for now, seems that the classes being talked about will only be for the C++ API to start, added for SP later on.
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #9 on: July 15, 2014, 06:44:13 AM » |
|
If I have a bit of a hard understanding of the new format, guess how hard this transition will be for those whom do not program this daily?
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #10 on: July 15, 2014, 09:09:22 AM » |
|
From what I've seen, you have a hard time understanding almost everything; I'm not really worried about others. Especially since it means that a lock of the hacky crap we have going on in the core can be removed.
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #11 on: July 15, 2014, 10:41:14 AM » |
|
From what I've seen, you have a hard time understanding almost everything; I'm not really worried about others. Especially since it means that a lock of the hacky crap we have going on in the core can be removed.
All it will do is appear to change the code, but the sourcepawn engine will still be the same.
|
|
|
|
|
Logged
|
|
|
|
|
Necavi
|
 |
« Reply #12 on: July 15, 2014, 07:56:59 PM » |
|
I'm talking about War3Source hacks to get around Sourcepawn's static nature, things like the inability to return arrays/strings, lack of native dynamic arrays and lack of struct/class support (Although that one is more appearance than anything else, it keeps things cleaner, which means fewer mistakes)
|
|
|
|
|
Logged
|
|
|
|
|
-El Diablo
|
 |
« Reply #13 on: July 16, 2014, 06:44:52 AM » |
|
It would be nice to return arrays/strings
|
|
|
|
|
Logged
|
|
|
|
|