|
Phantom Brave
|
 |
« Reply #810 on: June 23, 2012, 04:29:12 am » |
|
I don't want to live in a world where people refer to consts while talking about storing dynamic data I really don't
|
|
|
|
« Last Edit: June 23, 2012, 04:29:43 am by Chartreuse »
|
Logged
|
 Linkin Park lyrics here
|
|
|
Glock Topic
Newbie
Offline
Posts: 12
|
 |
« Reply #811 on: June 23, 2012, 04:42:39 am » |
|
no sir that is not how data types work
Yes sir, in Python bools, int's, None, str's among others are, in fact, immutable. and tuples
|
|
|
|
|
Logged
|
|
|
|
|
nightcracker
|
 |
« Reply #812 on: June 23, 2012, 04:43:23 am » |
|
I don't want to live in a world where people refer to consts while talking about storing dynamic data I really don't
Assuming you're talking to me, I was talking about immutable, not constant. Variable in Python's are more "names" for objects than anything. When I say a = 1 I assign the name "a" to 1. When I say a += 1 I'm actually saying a = a + 1, meaning I assign the name "a" to the value of "a" with one added. The int object with value 1 never changed. This is also the reason the ++ operator doesn't exist in Python.
|
|
|
|
« Last Edit: June 23, 2012, 04:49:21 am by nightcracker »
|
Logged
|
|
|
|
|
nightcracker
|
 |
« Reply #813 on: June 23, 2012, 04:47:27 am » |
|
no sir that is not how data types work
Yes sir, in Python bools, int's, None, str's among others are, in fact, immutable. and tuples As I said, among other things  (frozenset)
|
|
|
|
|
Logged
|
|
|
|
|
Orpheon
|
 |
« Reply #814 on: June 23, 2012, 04:50:44 am » |
|
I still prefer integer constants for team stuff because there isn't really a good reason why to use bools and it forces us to use signed bytes in syncing (something I don't like) or some extra if conditionals. If we allow None, we can't do easy if checking, so we'll have this if team: ... elif team == False: ... else: ... whilst with constants we would have if team == constants.TEAM_RED: ... elif team == constants.TEAM_BLUE: ... else: ... I prefer the latter. It's a lot more readable.
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
|
nightcracker
|
 |
« Reply #815 on: June 23, 2012, 04:52:22 am » |
|
I agree with Orpheon here.
|
|
|
|
|
Logged
|
|
|
|
|
Orpheon
|
 |
« Reply #816 on: June 23, 2012, 04:54:46 am » |
|
I agree with Orpheon here.
*Marks this in the historical PyGG2 chronicles.*
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
|
nightcracker
|
 |
« Reply #817 on: June 23, 2012, 04:55:39 am » |
|
I agree with Orpheon here.
*Marks this in the historical PyGG2 chronicles.* I was just going to edit my post saying "call the newspapers"  .
|
|
|
|
|
Logged
|
|
|
|
|
Phantom Brave
|
 |
« Reply #818 on: June 23, 2012, 06:10:30 am » |
|
I don't want to live in a world where people refer to consts while talking about storing dynamic data I really don't
Assuming you're talking to me, I was talking about immutable, not constant. Variable in Python's are more "names" for objects than anything. When I say a = 1 I assign the name "a" to 1. When I say a += 1 I'm actually saying a = a + 1, meaning I assign the name "a" to the value of "a" with one added. The int object with value 1 never changed. This is also the reason the ++ operator doesn't exist in Python. The int object with value 1 is a constant. The name "a" is a variable. I don't care about your semantics shit.
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
Glock Topic
Newbie
Offline
Posts: 12
|
 |
« Reply #819 on: June 23, 2012, 08:52:36 am » |
|
I don't want to live in a world where people refer to consts while talking about storing dynamic data I really don't
Assuming you're talking to me, I was talking about immutable, not constant. Variable in Python's are more "names" for objects than anything. When I say a = 1 I assign the name "a" to 1. When I say a += 1 I'm actually saying a = a + 1, meaning I assign the name "a" to the value of "a" with one added. The int object with value 1 never changed. This is also the reason the ++ operator doesn't exist in Python. The int object with value 1 is a constant. The name "a" is a variable. I don't care about your semantics shit. only a few values (0, 1, ..) have constants remainder dynamically instantiated immutables
|
|
|
|
|
Logged
|
|
|
|
|
Phantom Brave
|
 |
« Reply #820 on: June 23, 2012, 10:04:28 am » |
|
 how is it hard to understand that I don't fucking care about your language's semantic bullshit? Every other c-like language in the world calls them literals, and literals are constants. Changing the name doesn't do anything. Caring about the name being different when someone calls it the other thing just makes you a fucking jackass. Abstraction is your friend. Embrace it.
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
|
RedBluYellow
Guest
|
 |
« Reply #821 on: June 23, 2012, 10:13:48 am » |
|
 how is it hard to understand that I don't fucking care about your language's semantic bullshit? Every other c-like language in the world calls them literals, and literals are constants. Changing the name doesn't do anything. Caring about the name being different when someone calls it the other thing just makes you a fucking jackass. Abstraction is your friend. Embrace it. that image
|
|
|
|
|
Logged
|
|
|
|
|
NAGN
|
 |
« Reply #822 on: June 23, 2012, 10:50:46 am » |
|
uh yeah you know what fuck pygrafix; today I'm going to rework the font system so we can eliminate that dependency all together just so I don't have to compile it on my ubuntu laptop 
|
|
|
|
|
Logged
|
  [im
|
|
|
|
Orpheon
|
 |
« Reply #823 on: June 23, 2012, 11:02:44 am » |
|
uh yeah you know what fuck pygrafix; today I'm going to rework the font system so we can eliminate that dependency all together just so I don't have to compile it on my ubuntu laptop  ^ Pro problem solving.
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
Glock Topic
Newbie
Offline
Posts: 12
|
 |
« Reply #824 on: June 23, 2012, 04:13:47 pm » |
|
 how is it hard to understand that I don't fucking care about your language's semantic bullshit? Every other c-like language in the world calls them literals, and literals are constants. Changing the name doesn't do anything. Caring about the name being different when someone calls it the other thing just makes you a fucking jackass. Abstraction is your friend. Embrace it. literals are literals. they can instantiate both immutable and mutable objects. in c, they are values. c doesn't have references. literals are not constants. literals are a nice way to specify a new object want a non-constant literal example? [] in python. in python, c#, gml, js, and probably a bunch more, there are "mutable" and "immutable" objects. learn some stuff about programming.
|
|
|
|
|
Logged
|
|
|
|
|