Re: What is the Point of Static or Constant Variables?

2020-02-04 Thread AudioGames . net Forum — Developers room : leibylucw via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? This is a programming 101 kind of topic, but it's actually [extremely] important in practical terms. What if, for some reason, there was a change in value? What if x needs to be 1,036,173...?As Ethin pointed out, it would be tedio

Re: What is the Point of Static or Constant Variables?

2020-02-04 Thread AudioGames . net Forum — Developers room : leibylucw via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? This is a programming 101 kind of topic, but it's actually [extremely] important in practical terms. What if, for some reason, there was a change in value? What if x needs to be 1,036,173...?As Ethin pointed out, it would be tedio

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? @8 actually it depends.If for instance, you're contributing to an opensource project you should use the code convention that the project is using, provided that it has one to begin with.Or, you can follow the code convention o

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? @8, it depends on what you want to do.@6, yes,static variables can be non-constant. The reason I indicated that static variables are constant is usually because they (always) should be unlesss you've got locking in place (Rust enf

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : DyingMoose93 via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? It's all personal preference, I prefer CC, I know a lot of people prefer underscores or dashes. I personally think it just saves a bit of typing, that's the only real advantage. URL: https://forum.audiogames.net/post/49831

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? But why would I use CC over underscores? Diddo for the opposite question? URL: https://forum.audiogames.net/post/498314/#p498314 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : DyingMoose93 via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? @all, thank you for the help.@Americranian, Your second example is called camel case, which is widely used by programmers for ease of typing. Basically, you write the first word of your variable lowercase, and then after that, all

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? Static and constant variables have two similar but different purposes. Constant variables by there name are constant and can never be changed. This is helpful in many situations when you want a value but you never want it to be

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? I have used tuples in Python before. I think they are mostly there to prevent accidental modification. They also technically take up less memory, though that is not too noticeable.@4, I have a somewhat unrelated question.I have seen

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? I have used tuples in Python before. I think they are mostly there to prevent accidental modification. They also technically take up less memory, though that is not too noticeable. URL: https://forum.audiogames.net/post/498297

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? Constants are also good for giving names to "magic values" as well. A "magic value" is any value that you just randomly injected into your code. Moregenerally, a "magic value" is any value in your progra

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? Constants are also good for giving names to "magic values" as well. A "magic value" is any value that you just randomly injected into your code. For example, if you've got a set of formula values for calculat

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : dardar via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? Personally, I use them for things that would otherwise be too bothersome to type out again and again, for instant:const string description="This is a dromatic description about the game. You are shown this when ever you play a new

Re: What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector
Re: What is the Point of Static or Constant Variables? I think it's mainly so you can just give names to arbitrary vallues. I use constants a lot for things like the direction a player can move. DIR_UP is 0, DIR_UP is 1, ETC. URL: https://forum.audiogames.net/post/498254/#p4

What is the Point of Static or Constant Variables?

2020-02-03 Thread AudioGames . net Forum — Developers room : DyingMoose93 via Audiogames-reflector
What is the Point of Static or Constant Variables? Hello,I've always wondered, what the point of static or constants, and by extention, touples,  are. I mean, they keep it so that you can't modify them, but why. If the dev doesn't want them to be modified, don't modi