On Oct 10, 2010, at 9:04 PM, egervari wrote:

> In the case of the sqrt line, those parenthesis are not required, and
> you're right - they are less readable.
>=20
> But take for example this line:
>=20
>    y =3D 10.div 10.div 5
>=20
> This is valid code. It produces the result "5". To me, this looks
> really bad though. Believe it or not, I can infer exactly what it's
> doing much easier by writing it this way:
>=20
>    y =3D 10.div(10.div(5))
>=20
> The order is very clear.
>=20
> See, in Scala, you don't need the "." when you drop the parenthesis,
> so dropping them both turns out to be much nicer and clearer:
>=20
>    val y =3D 10 div (10 div 5)

Is it really productive to compare the use of punctuators in Ruby with =
that of Scala? If you read Scala better, use it. If you see value in how =
Ruby programs read, fine, use Ruby. I wouldn't expect Ruby's syntax or =
idioms to change dramatically in response to how you visually parse =
Scala. I would, similarly, not expect much ground to be given to work =
with lazy IDEs that don't correctly parse Ruby code.=20

> To me, that actually looks very nice indeed (let's assume div is also
> a method on Int in Scala). Of course, dropping all the parenthesis
> would change the result to .2 (or 0 I guess).
>=20
> I just think this mandatory "." without the parenthesis looks weird
> and is unintuitive. I think it's better to drop both, or to have both.
> The middle-of-the-road syntax that includes the "." just looks bad.
>=20
> Of course, once one gets used to it, I guess it'll become readable.
> Just not the most intuitive, that's all.
>=20