Code center > Suggestions
Gene structure - cond start stop
Gobo:
--- Quote from: EricL ---I like 'bool' better than 'b' and I like 'pop' better than 'drop'. Pop is the well understood term for popping a value off a stack and bool is more descriptive.
--- End quote ---
pop is well understood term for popping a value off a stack and store it in a variable or a register. It's drop that is used for discarding the top value in languages operating with stack, such as Forth. And 'bool' is too long itself to join it with something else, IMHO. I don't insist, I just try to explain my position.
EricL:
--- Quote from: Gobo ---b]pop[/b] is well understood term for popping a value off a stack and store it in a variable or a register. It's drop that is used for discarding the top value in languages operating with stack, such as Forth. And 'bool' is too long itself to join it with something else, IMHO. I don't insist, I just try to explain my position.
--- End quote ---
I've never coded in Forth. My tiny brain just does not think of the term 'drop' as a stack operator. Since actual pops to a location are implicit in DNA, I thought using it for drop was appropriate but if drop is the term actually used in real languages for a pop to nowhere, then we can go with that. It's not a big deal.
I like longer, more descriptive names in general. e.g. .totalmyspecies. The only reason to keep things short is to make DNA text more compact for the human. This all has no impact on the underlying numerical DNA of course.
Can we go with:
ClearBool
DropBool
ClearInt
DropInt
Numsgil:
I LikeVariableNamesThatAreLongAndDescriptiveToo, but the DNA language has a sort of assembly feel to it that just begs for 3 and 4 letter operators (sysvars not so much).
For DB3, I was toying with different stack operations based on booleans, nd ran into this same problem. So for the boolean versions of dup and swap, (which we might want to add, too), I used dub and swab. In general, most stack operations have a p in them. push, pop, dup, swap, etc. So the rule I chose was that operations on the boolean stack replace any instances of p with b. Thus you have bob (like bobbing hair), swab, and dub.
Peter:
--- Quote from: EricL ---I like longer, more descriptive names in general. e.g. .totalmyspecies. The only reason to keep things short is to make DNA text more compact for the human. This all has no impact on the underlying numerical DNA of course.
Can we go with:
ClearBool
DropBool
ClearInt
DropInt
--- End quote ---
I prefer a little longer above just a little too short. I fact at seeing it you have to know what it does, and at seeing this I know exactly wat it means, so I agree.
Gobo:
--- Quote from: Numsgil ---Thus you have bob (like bobbing hair), swab, and dub.
--- End quote ---
Though I'd prefer drob over bob anyway
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version