Josh @ Dreamland
|
 |
Reply #30 Posted on: January 09, 2010, 06:44:11 PM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2261
|
Yes, but I wanted them to be able to say map a; And have it assume they meant map<variant, variant>.
This whole idea started when Luda bitched he wanted structs in EDL. It's perfect, when you think about it. GM users have an inefficient way of having a structure (global, and instantiations of bloated-down objects), which Luda has apparently exploited in the past. This way will allow users, any who are willing to read a 150 word manual entry, to declare a structure as efficient as any other.
Also, parsing STL for members removes ambiguity. string a; a.length()... that won't even look like a syntax error, because length is a public member of a's type, string.
|
|
|
|
« Last Edit: January 09, 2010, 06:51:33 PM by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|
|
|
|
|
|
|
Rusky
|
 |
Reply #36 Posted on: January 12, 2010, 09:16:06 PM |
|
|
 Location: Airship Abubalay Joined: Feb 2008
Posts: 806
|
It just comes from the stupid idea to use <> for templates. Because the lexer finds the biggest token it can and >> is an operator, closing two template tags in a row causes problems. Other than that, this behavior for the lexer makes perfect sense- it parses "asdfasdf = 3" as asdfasdf, = and 3, rather than a, s, d, f, a, s, d, f, = and 3.
|
|
|
|
|
Logged
|
|
|
|
score_under
|
 |
Reply #37 Posted on: January 13, 2010, 01:02:11 PM |
|
|
 Joined: Aug 2008
Posts: 314
|
It just comes from the stupid idea to use <> for templates.
Exactly. Because the lexer finds the biggest token it can and >> is an operator, closing two template tags in a row causes problems. Other than that, this behavior for the lexer makes perfect sense- it parses "asdfasdf = 3" as asdfasdf, = and 3, rather than a, s, d, f, a, s, d, f, = and 3.
And if it did that (string into array of chars, i.e. NOTHING :p ), there'd really be no point in it.
|
|
|
|
|
Logged
|
|
|
|
RetroX
|
 |
Reply #38 Posted on: January 13, 2010, 03:22:36 PM |
|
|
Master of all things Linux
 Location: US Joined: Apr 2008
Posts: 1121
|
It just comes from the stupid idea to use <> for templates. Because the lexer finds the biggest token it can and >> is an operator, closing two template tags in a row causes problems. Other than that, this behavior for the lexer makes perfect sense- it parses "asdfasdf = 3" as asdfasdf, = and 3, rather than a, s, d, f, a, s, d, f, = and 3.
It does not make sense to be green without chlorophyll.
|
|
|
|
|
Logged
|
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)Why do all the pro-Microsoft people have troll avatars? 
|
|
|
|
|
|
|
Josh @ Dreamland
|
 |
Reply #41 Posted on: January 13, 2010, 10:28:32 PM |
|
|
Prince of all Goldfish
 Location: Ohio, United States Joined: Feb 2008
Posts: 2261
|
Like fucking up my parser. Twice.
|
|
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|
|
|
|