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

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-14-2017 , 20:06   Re: New API and Syntax
Reply With Quote #841

Quote:
Originally Posted by nergal View Post
why do u need instance variables?
Cuz classes that's why
headline is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-14-2017 , 20:13   Re: New API and Syntax
Reply With Quote #842

Quote:
Originally Posted by Headline View Post
Quote:
Originally Posted by nergal View Post
why do u need instance variables?
Cuz classes that's why
but...


Last edited by 404UserNotFound; 03-14-2017 at 20:17.
404UserNotFound is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-14-2017 , 20:27   Re: New API and Syntax
Reply With Quote #843

Quote:
Originally Posted by abrandnewday View Post
but...

They're definitely not real classes.
headline is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-14-2017 , 22:35   Re: New API and Syntax
Reply With Quote #844

oh. well fuck.

Last edited by 404UserNotFound; 03-14-2017 at 22:36.
404UserNotFound is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-15-2017 , 22:51   Re: New API and Syntax
Reply With Quote #845

Quote:
Originally Posted by abrandnewday View Post
oh. well fuck.
By classes I implied everything that's "standard" with them: instance vars, encapsulation, inheritance, polymorphism, etc.

Last edited by headline; 03-15-2017 at 22:52.
headline is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 03-17-2017 , 13:46   Re: New API and Syntax
Reply With Quote #846

Quote:
Originally Posted by Headline View Post
By classes I implied everything that's "standard" with them: instance vars, encapsulation, inheritance, polymorphism, etc.
what problem does having instance vars solve, especially in the case of sourcemod? the SM dev team isn't going to put their entire efforts into a language feature if it doesn't solve a practical problem.

everything else, the methodmaps can do as well. Methodmaps don't have Polymorphism but you can "overload" and override methods that have the same name, even when the methods are inherited.
__________________
nergal is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-17-2017 , 14:44   Re: New API and Syntax
Reply With Quote #847

Quote:
Originally Posted by nergal View Post
what problem does having instance vars solve, especially in the case of sourcemod? the SM dev team isn't going to put their entire efforts into a language feature if it doesn't solve a practical problem.

everything else, the methodmaps can do as well. Methodmaps don't have Polymorphism but you can "overload" and override methods that have the same name, even when the methods are inherited.
It becomes really difficult to manage large amounts of data. Even struts would do fine here, I just love objects.

The methodmap system is OK, I think it's a great solution for modernizing our API for now
headline is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 03-17-2017 , 16:47   Re: New API and Syntax
Reply With Quote #848

Quote:
Originally Posted by Headline View Post
It becomes really difficult to manage large amounts of data. Even struts would do fine here, I just love objects.

The methodmap system is OK, I think it's a great solution for modernizing our API for now
use a stringmap/dictionary then if you want to handle large amounts of data.
__________________
nergal is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-17-2017 , 23:59   Re: New API and Syntax
Reply With Quote #849

Quote:
Originally Posted by Headline View Post
The methodmap system is OK, I think it's a great solution for modernizing our API for now
This x1000. I've actually pushed myself to learn to use StringMaps, ArrayLists, DataPacks as well as learning to use menus and panels more efficiently under new syntax via the methodmaps. Next up on my list is KeyValues which I am not looking forward to as I've never messed around with while and do before. But I really want to get into making config files for things, so I have to learn it.
404UserNotFound is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-18-2017 , 02:45   Re: New API and Syntax
Reply With Quote #850

Quote:
Originally Posted by nergal View Post
use a stringmap/dictionary then if you want to handle large amounts of data.
Yeah I probably will switch to that.
headline is offline
Reply



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 08:29.


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