Index · Preferences · Help
Announcements · BYOND Features · Bug Reports · Fixes and Features · Developer How-To · Code Problems · Design Philosophy · Creations · Classified Ads · Gaming · Computers & Technology · Community
Forum Search:

[Advanced Search]

[Messages in this Thread] [Show All (17)] [Return to Design Philosophy]

Author:Stephen001 [Posts]
Date:11/5/09 2:10 pm
Topic:Re: Useage of if() proc
Post ID:725891
Parent ID:725889
Next ID:725893
I would possibly not suggest the "proper" solution you presented was any more "proper" than a fairly extensive if chain. It opens up plenty of issues of it's own because of typing and data ranges.

You do have a point on the if statement being a good potential for new programmer mess-ups, but simply it's not really "over-complicating" as inappropriate use.

It goes for all languages features, use where it seems most appropriate. This is hard for new programmers to nail, because they need to learn this by experience by and large.

Ironically if statements stop being appropriate at many path branches, yet hold their own at complex expression branching. Typically most complexity can be abstracted away by a good object (read:datum, obj, mob whatever works for the given data) model, including mitigating issues with types and data ranges a la your call() solution.

Messages in this Thread: [Show All (17)]

  Useage of if() proc Ant305 (11/5/09 1:33 pm)
      Re: Useage of if() proc Magicsofa (11/17/09 12:24 pm)
          Re: Useage of if() proc Garthor (11/17/09 12:29 pm)
      Re: Useage of if() proc Rushnut (11/5/09 2:46 pm)
      Re: Useage of if() proc Jeff8500 (11/5/09 2:00 pm)
          Re: Useage of if() proc Garthor (11/5/09 4:52 pm)
              Re: Useage of if() proc Ant305 (11/5/09 5:16 pm)
                  Re: Useage of if() proc Garthor (11/5/09 5:31 pm)
                      Re: Useage of if() proc Popisfizzy (11/5/09 8:45 pm)
                          Re: Useage of if() proc Garthor (11/5/09 9:01 pm)
                      Re: Useage of if() proc Ant305 (11/5/09 8:01 pm)
          Re: Useage of if() proc Stephen001 (11/5/09 2:10 pm)
              Re: Useage of if() proc Jeff8500 (11/5/09 2:33 pm)
                  Re: Useage of if() proc Ant305 (11/5/09 4:36 pm)
                      Re: Useage of if() proc Garthor (11/5/09 4:50 pm)
      Re: Useage of if() proc ArcaneDragonX (11/5/09 1:47 pm)
      Re: Useage of if() proc Garthor (11/5/09 1:37 pm)