|
|
Josh @ Dreamland
|
|
Reply #17 Posted on: March 05, 2010, 10:34:32 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
It's by no means a hack. GML does support switch(); it will let you switch either a real or string. Switching an array switches its first value. Just because a code uses goto doesn't mean it's a hack. Goto was excommunicated from use in high level code due to it making said code difficult to read when misused. Case labels are just that: labels. The compiler writes the hash map instead of me doing it. The same will apply to ENIGMA.
|
|
|
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
|
|
|
|
The 11th plague of Egypt
|
|
Reply #19 Posted on: March 05, 2010, 06:23:04 pm |
|
|
Joined: Dec 2009
Posts: 274
|
It's by no means a hack. GML does support switch(); it will let you switch either a real or string. Switching an array switches its first value. Just because a code uses goto doesn't mean it's a hack. Goto was excommunicated from use in high level code due to it making said code difficult to read when misused. Case labels are just that: labels. The compiler writes the hash map instead of me doing it. The same will apply to ENIGMA.
Hell, I didn't know GM had such a statement. Really, I saw no one using it in the GMC. The first time I heard about it was studying C++ BTW I really hope you aren't using gotos in the rest of your code as well, unless you aim at being a sole developer
|
|
« Last Edit: March 05, 2010, 06:26:44 pm by The 11th plague of Egypt »
|
Logged
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #21 Posted on: March 05, 2010, 07:24:18 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I use a goto roughly four times in the C parser. My labels are usually descriptive and located nearby. Usually.
|
|
|
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
|
|
|
|
Josh @ Dreamland
|
|
Reply #23 Posted on: March 06, 2010, 01:39:35 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
All right, that's finally starting to bother me. If any of those things were the case, where the hell was anyone that was going to prove that? Hm? I was the only one doing fuck-anything on this project. I expressed countless times that I hate the recursive decent method. I don't care if you'd rather study one of those methods than learn mine; mine's faster. And no, using recursive-descent would not have made the project finish faster, because I would have given up. Or needed an entire fucking team to help me.
I'm getting sick of your cynical opposition at every turn. If you think you can do this job better than me, feel free. It's even open source. Until that time, stop pretending that because you can read about a method that you can understand it and replicate it faster than I can.
I scarcely think you understand some of the things my parser can read. Let me tell you, I wrote the parser, and there were things it parsed that I didn't understand.
|
|
« Last Edit: March 06, 2010, 01:44:35 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
|
|
|
|
Josh @ Dreamland
|
|
Reply #25 Posted on: March 06, 2010, 02:43:50 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Feel free to read it over and discern what has been reinvented.
...Also, writing a parser for one language does not imply that you can write one for any language. Especially not C++.
|
|
|
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
|
|
|
|
Josh @ Dreamland
|
|
Reply #27 Posted on: March 06, 2010, 08:53:00 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
What good design would you be torturing with GM's?
Also, the only thing which would require a complete change in the logic of my parsers is a complete change in the language itself. New keywords can be added to the GML parser by changing one line, and to the C++ parser (more comprehensive) by adding in roughly three places (The switch of keywords, the list of token codes, and the handler for each under the semicolon/comma handler).
|
|
|
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
|
|
|
|
|
|