Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Coding Conventions

Discussion in 'Scripting' started by junior333istall, Feb 11, 2023.

  1. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,135
    No particular source for that list; just some things that popped to my mind that I thought could help with ending up with a more cohesive code base - and perhaps even reduce the number of bugs that crop up.
     
  2. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    531
    I appreciate your taking the time to reply. They were (in my mind) fairly high up the conventions ladder. Don't name your variables "foo" is what I tell novices :)

    Thanks though.
     
  3. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,135
    Yeah, that's fair... I may have gotten carried away to some not-so-complete-beginner-oriented conventions after the one about using a namespace :confused: Sorry OP!

    I don't think there's any particular hurry for a beginner to force themselves to learn all about recommended coding conventions. At least for me those were things I naturally picked up more and more of slowly over time. I think you need some experience (of pain) under your belt for many of the recommendations to really click.
     
    Nad_B and tleylan like this.