Raised This Month: $12 Target: $400
 3% 

Why you're banning old syntax? Backwards compatibility is very important!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 11-11-2020 , 12:19   Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #1

I don't know why you are doing this. I appreciate your effort in developing sourcemod. But you keep banning a lot of old syntax which is causing problems for a lot of coders.

Why is this required?

Quote:
We would like to give our users a more modern language. Pawn is showing its age; manual memory management, buffers, tags, and lack of object-oriented API are very frustrating. We can't solve everything all at once, but we can begin to take steps in the right direction.
For example: Why the HELL are you planning to remove Array-based enum structs in 1.11. This is used in mostly all bigger plugins. When you want a massive change in enum, bring out enum2 and don't destroy 100 million lines of code using the previous enum.
Or this one: functag Why has this been removed? There is no reason for this besides there is another way to do it.

Backwards compatibility is MODERN! To destroy old code for getting a language which some great coders consider a "modern language" is the worst thing you could do to me.
fragnichtnach is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 11-11-2020 , 12:38   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #2

You can still use prior compiler versions?

The generated SP bytecode is forward-compatible with SP VM and hasn't seen breakage since 1.0 & 1.6?.
__________________
RumbleFrog is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-11-2020 , 13:42   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #3

tbh backwards compatibility slows forward progression. This is a main issue with python also, "what version do I need to run this script?" etc.
We were told about these changes for years and especially not to use array-based enum structs. It's kind of mindless work to convert from old syntax to new syntax now.
Mitchell is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 11-12-2020 , 03:30   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #4

Quote:
Originally Posted by RumbleFrog View Post
You can still use prior compiler versions?

The generated SP bytecode is forward-compatible with SP VM and hasn't seen breakage since 1.0 & 1.6?.
At least we've got this.
fragnichtnach is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 11-12-2020 , 18:59   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #5

There have been quite a few source-code breaking changes in new major releases of SourceMod. As the language evolves, things must be removed in order to make any kind of forward progress. The main compatibility we put the upmost effort in maintaining is binary compatibility. For the most part, even the most ancient of plugins are still supported on the latest SourceMod build.
headline is offline
BAILOPAN
Join Date: Jan 2004
Old 11-13-2020 , 20:04   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #6

Not much I can add here, since it's been said, but to reiterate: Yes, it's a pain. It sucks when stuff that worked stops working. It happens to me as a downstream developer on other projects, and I don't love it.

We work very hard on compatibility (something most projects do not do), which is why you can pull SM from 2006 and its plugins will probably still compile and work today. The amount of work to make Transitional Syntax happen - while still preserving the old declaration style - was insane. The parser is littered with dozens of mind-numbing hacks to make that work. I guarantee there are still bugs in it somewhere.

The number of people who actively work on SourcePawn is not zero, but it's less than 1, which is part of the tradeoff. Array-based enum structs were so poorly implemented and so under-specified that there was no feasible way I could keep them working while achieving other goals in my free time. Given I was able to add a straightforward replacement, and given you can use older compilers, I think it was a fair change to make.

If you're wondering, "what will break next?" Probably nothing. Array-based enum structs was the big baddie, and I think pretty much everything else in the language can be preserved going forward.
__________________
egg
BAILOPAN is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-13-2020 , 21:43   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #7

@BAILOPAN I try to make a machine learning which is completely new zone to me, not sure if this is even achievable . Is it safe for me to to use the enum struck now or should I wait for proper oop style programming? I ll be on it in a month or two.

___________________
six eggs

Last edited by GsiX; 11-13-2020 at 21:50.
GsiX is offline
BAILOPAN
Join Date: Jan 2004
Old 11-13-2020 , 22:13   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #8

Enum structs are safe to use and the syntax is a lot better than the old array based ones.
__________________
egg
BAILOPAN is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-20-2020 , 11:57   Re: Why you're banning old syntax? Backwards compatibility is very important!
Reply With Quote #9

Quote:
Originally Posted by fragnichtnach View Post
Array-based enum structs in 1.11. This is used in mostly all bigger plugins. When you want a massive change in enum, bring out enum2 and don't destroy 100 million lines of code using the previous enum.
If the point of the question is about correct conversion to the new syntax, here are two examples of how to accomplish that (just compare with original).
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode