Re:WeinbergAlpha: DuckDuckGoes opensource with its WolframAl...
by jrockway on Thursday July 15, 2010 @10:20AM
(#1517869)
I agree that defining the hash the "old fashion way" may be wordy but what I like about wordy things is they are usually easier to understand. Those looking at the wordy code will have one less thing to learn, which will translate into faster learning.
I disagree. Using a set to represent a set is more readable than using hash keys to stand in as a set. As it stands, the hash maps values in the set to undef, and maps values outside the set to undef. This is confusing. Confusion translates to slow knowledge uptake.
Don't try to jam a square peg into a round hole when you have a round peg in your other hand.
I agree that defining the hash the "old fashion way" may be wordy but what I like about wordy things is they are usually easier to understand. Those looking at the wordy code will have one less thing to learn, which will translate into faster learning.
Another thing that I like about wordy is it tends to make porting to other languages a lot easier. For example, one of the tools that I had written in Perl was translated to Javascript with fair ease because I stucked with the basics.
I personally find that being wordy is a good thing instead of a bad thing. Obviously there is a point where not accepting change or wanting to learn a new trick is just being ignorant though.