Douglas Brebner <squeakli...@...> writes:
> Please bear in mind that natural languages have much more redundancy and
> less precision than programming languages.
You are right!
Personally I believe programming languages should strive to be as close to the
the more stringent English of specification documents, and not to natural
language with *all* its facets. The main line of argumentation in my previous
mail was thus that the very argument of natural languages can be used in favor
of my point as well :)
> In addition, programming languages have handy tools like autocompletion
> that natural languages don't, making abbreviations less useful :)
That argument keeps popping up (eg from Ramon just in parallel to this
answer, and also before) but I am not sure if auto completion is the whole
story. For example in Object-C you have to write
@"hello " stringByAppendingString: @"worlds!"
to concatenate strings. Whereas in Smalltalk we just write
'hello ', 'worlds!'
clearly both are as writable when you got auto completion, but isn't the
second just more readable? In his "Elements of Style" William Strunk
recommends to omit unnecessary word. With regard to source code, I'd say the
lesson should be that more verbose is typically more readable but *not*
always.
So given this observation that sometimes operators (or single letters, which
for that sake the same) are *sometimes* more readable than natural language,
we can go an revisit the set of operators in Smalltalk and check if there
might be more candidates. And I'd be more than surprised if are were not some
more candidates for abbreviation.
For example Pharo already got #<< for appending to a stream, so the same would
make sense to append elements to a collecton, such that we can write
list := List new << 'lorem' << 'ipsum' << 'dolor'.
et cetera.
--AA
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project