AWGRead

Friday, February 15, 2019

Coding without IF statements

Found below linked article that provides tips on how to avoid using IF statements, with one of the benefits being readability. The tips largely are based on the concept of using a map to the result, which is essentially a one-in replacement of a switch statement. If's can be rigged in too as the examples show:
https://edgecoders.com/coding-tip-try-to-code-without-if-statements-d06799eed231
Posted by S931Coder at 8:21 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Idioms
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Links

  • AWGtek

Blog Archive

  • ▼  2019 (2)
    • ►  May (1)
    • ▼  February (1)
      • Coding without IF statements
  • ►  2017 (1)
    • ►  March (1)
  • ►  2016 (6)
    • ►  October (1)
    • ►  July (4)
    • ►  January (1)
  • ►  2015 (1)
    • ►  March (1)
  • ►  2014 (4)
    • ►  October (1)
    • ►  September (1)
    • ►  May (1)
    • ►  March (1)
  • ►  2013 (6)
    • ►  November (1)
    • ►  September (1)
    • ►  July (1)
    • ►  May (3)
  • ►  2012 (4)
    • ►  September (2)
    • ►  July (2)

Labels

Anti-patterns Architecture Business Logic C ColdFusion ColdSpring Database DI Idioms Java Java EE OOP Programming Languages Ruby Rules-engines Singleton Unit Testing XML XSS

About Me

S931Coder
Documenting my journey through the world of IT.
View my complete profile
Travel theme. Powered by Blogger.