Re^32: Why? (each...)
by ikegami (Patriarch) on May 20, 2011 at 22:39 UTC
|
I think you're argument is:
One has a reasonable expectation of seeing a list following a paren, so parens indicate the presence of a list.
I stipulate that this is a valid argument — true if it's premises are true — but I don't buy the premise.
The odds of seeing something other than a list after a paren is too great for it to be reasonable to expect to see a list following a paren.
Even with your made up number of 89%, that means one bug every 10 parens. That's a huge error rate! Much too great to use in teaching.
| [reply] |
|
|
| [reply] |
|
|
So if someone is not sure which one to use they could think "[]=array, {}=hash, and ()=list, and I'm assigning it a list of key/value pairs, so I guess I should use parens
Yeah, except they will be thinking, "ah, I'm assigning to an array, so I must use []". It's a really bad meme, because all three are actually wrong. [] doesn't create arrays, it creates (in the right context) references. Same with {}.
| [reply] [d/l] [select] |
|
|
|
|
|
|
|
|
|
|
Same rebuttal.
Even with your made up number of 89%, that means one bug every 10 parens when declaring and initializing a hash or array. That's a huge error rate! Much too great to use in teaching.
Was not claiming it was accurate.
Yet your whole argument depends on it.
So if someone is not sure which one to use they could think "[]=array, {}=hash, and ()=list, and I'm assigning it a list of key/value pairs, so I guess I should use parens".
(I'm going to assume you meant "array ref" and "hash ref". Clearly one shouldn't use @a = [1,2,3]; to create an array with three elements.)
This is a false trichotomy. [] (array ref) vs {} (hash ref) vs neither (array or hash) is far more accurate. This is what I told the OP.
| [reply] [d/l] [select] |
|
|
Re^32: Why? (each...)
by ikegami (Patriarch) on May 20, 2011 at 21:58 UTC
|
There's an implied level of uncertainty with "indicate". That is, the "likely" , "probably", etc. is implied.
I don't understand why you bring this up. You've already agreed that "a list is likely present" isn't the same as "a list is present". It now sounds like you're trying to prove the opposite. Did you change your mind? Either way, the argument fails.
Our records indicate a depth of 3,000 feet here.
What's uncertain here is the validity of the records. You can't measure the validity of parens.
The map indicates where the treasure is buried.
What's uncertain here is the validity of the map. You can't measure the validity of parens.
That is, the "likely" , "probably", etc. is implied.
The uncertainty would be about the validity of the parens, and that makes no sense. The uncertainty is therefore not applicable to "parens indicate the precense of a list".
There is a relation between the records and the depth: The records were built from measurements of the depth. This is why the records indicate the depth.
There is a relation between the map and the treasure: The map was built based on information about the treasure. This is why the map indicates the location of treasure.
There is a no relation between parens and list, so one can't indicate (point to) the other. This is why the parens don't indicate the presence of a list.
| [reply] |