View Single Post
nergal
Veteran Member
Join Date: Apr 2012
Old 02-11-2021 , 17:50   Re: SourceGo: Golang to SourcePawn Transpiler (v1.4 beta)
Reply With Quote #9

good news, SourceGo aka Go2SourcePawn, is now in open beta at version 1.4

It now has a complete SourceMod interface file for being able to use SM's natives in a Golang-way.
SourceGo also has a built-in function `__sp__` for inlining SourcePawn code that can't be replicated from SourceGo:
PHP Code:
var kv KeyValues
__sp__
(`kv = new KeyValues("config.cfg");`) 
becomes:
PHP Code:
KeyValues kv;
kv = new KeyValues("config.cfg"); 
Newest feature for 1.4 is using `make` to create dynamically sized, local arrays.
PHP Code:
my_str := make([]charsize
which would become:
PHP Code:
char[] my_str = new char[size]; 
__________________

Last edited by nergal; 02-12-2021 at 15:04. Reason: adding code as example usage.
nergal is offline