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

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
nergal
Veteran Member
Join Date: Apr 2012
Old 10-27-2015 , 11:46   Re: New API and Syntax
Reply With Quote #621

Quote:
Originally Posted by asherkin View Post
Yes, its replacement is still undecided I believe.
What is the issue with "any" ?

since it coerces to any type, why not name it off as 'all' or 'object'?
__________________
nergal is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-27-2015 , 11:49   Re: New API and Syntax
Reply With Quote #622

Quote:
Originally Posted by nergal View Post
What is the issue with "any" ?
It destroys any hope of type safety.

A function being able to take a float or an int and have no way of distinguishing between them is completely broken.
__________________
asherkin is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 11-07-2015 , 15:54   Re: New API and Syntax
Reply With Quote #623

may I request the ability for methodmaps to overload operators or is that already a planned feature?

EDIT: Can I also request the support for UTF-32 so I can use Aramaic identifiers?
__________________

Last edited by nergal; 11-09-2015 at 10:32.
nergal is offline
BAILOPAN
Join Date: Jan 2004
Old 11-12-2015 , 04:32   Re: New API and Syntax
Reply With Quote #624

Operator overloading is not impossible to do in the current toolchain but it is not trivial either. Showing your use case will help.

Pawn should support Unicode strings (and I believe it already does), but identifiers and keywords will remain ASCII, as they do in most languages. Having "☃ �� = ��;" be a valid program is just too weird.
__________________
egg
BAILOPAN is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-12-2015 , 05:38   Re: New API and Syntax
Reply With Quote #625

Who can help with with https://forums.alliedmods.net/showthread.php?t=274632
__________________
gubka is offline
Send a message via ICQ to gubka
nergal
Veteran Member
Join Date: Apr 2012
Old 11-12-2015 , 09:31   Re: New API and Syntax
Reply With Quote #626

Quote:
Originally Posted by BAILOPAN View Post
Pawn should support Unicode strings (and I believe it already does), but identifiers and keywords will remain ASCII, as they do in most languages. Having "☃ ****************** = ******************;" be a valid program is just too weird.
Can you at least make #define support unicode so it's possible to tokenize the keywords? I'd like to help my cousins learn sourcepawn.
__________________
nergal is offline
BAILOPAN
Join Date: Jan 2004
Old 11-12-2015 , 15:06   Re: New API and Syntax
Reply With Quote #627

And we're back to http://oldhome.schmorp.de/marc/bournegol.html again. Twice in two months, not a good sign.
__________________
egg
BAILOPAN is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 11-12-2015 , 21:23   Re: New API and Syntax
Reply With Quote #628

Quote:
Originally Posted by BAILOPAN View Post
And we're back to http://oldhome.schmorp.de/marc/bournegol.html again. Twice in two months, not a good sign.
( ͜。 ͡ʖ ͜。)

what I meant was something like this...

PHP Code:
#define עד    while
#define מניא  int
#define מדר   return 
At least allow people like me to make foreign language versions of the keywords using #define, that way English readers can translate every token created by the #define to match the English keywords.
__________________

Last edited by nergal; 11-12-2015 at 21:24.
nergal is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 11-12-2015 , 22:18   Re: New API and Syntax
Reply With Quote #629

I fail to see how what you suggested counters what BAILOPAN stated.
Potato Uno is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-13-2015 , 05:44   Re: New API and Syntax
Reply With Quote #630

You need to stop thinking of it as the word "while" and instead as the characters 'w', 'h', 'i', 'l', 'e' in that order.
__________________
asherkin 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 00:11.


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