View Single Post
Old 07-25-2009, 06:53 AM   #2139
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

I reall wish something similar to namespaces existed. That way, for my custom race, I could have KalimdorRaiders.Units.KOBOLD_MINER. Right now to get something syntactically similar I have to do the following


Collapse JASS:
    private struct KR_Units
        static constant integer KOBOLD_MINER = 'kru0'
    endstruct
    private struct KR_Abilities
        
    endstruct
    private struct KR_Heroes
        static constant integer CENTAUR_KAHN = 'KrH0'
    endstruct

    struct KalimdorRaiders
        static KR_Units Units
        static KR_Abilities Abilities
        static KR_Heroes Heroes
    endstruct

rather than just something like

Collapse JASS:
    namespace KalimdorRaiders
        namespace Units
            constant integer KOBOLD_MINER = 'kru0'
        endnamespace
        namespace Heroes
            constant integer CENTAUR_KAHN = 'KrH0'
        endnamespace
    endnamespace
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote