From: Bill Kelly Date: 2004-04-04T08:22:46+09:00 Subject: Re: deciding between ruby and python Hi, From: "Ville Vainio" > Atrdridel> Then with an array of Sockets, you can do: > > Atrdridel> [......].join("\n") > > Atrdridel> src: 10.10.0.0 dest: 10.10.0.1 > Atrdridel> src: 10.10.0.0 dest: 10.10.0.2 > > Atrdridel> Useful? > > Indeed it is. We do the same thing in Python (just define __str__() in > your classes), but with the added spice of "explicit is better than > implicit". So you need to coerce thems to strings before you join > them: > > list_as_strings = [str(e) for e in list_of_objects] > > I consider this a feature, because it leads to more robust code and > less surprises. [...] > The implicit coercion is going to burn you on > large projects A little foolishly, probably, I feel somewhat impelled to point out that these "you need X(==explicit conversion) or you're going to be burned on large projects" arguments, . . . . seem categorically indistinguishable from arguments people make with such conviction--and often faux authoritative certitude--about static typing. You need static typing our you're going to be burned on large projects! . . . And the Smalltalkers sing, Doot, doo doot, doo doot, doo doot doo Doot, doo doot, doo doot, doo doot doo doot :) So, ... you seem to feel comfortable with Python's dynamic typing for large projects. Plenty of people are out there, ready to argue with you that you're wrong and that you need static typing. ... Perhaps you could go argue with them about why you don't need static typing, instead of arguing with us about why we do need explicit conversion. Just having fun, (but with no fear of undertaking a large Ruby project in a Test Driven Design environment) Regards, Bill