Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra...
by SamReidHughes on Friday December 20, 2019 @08:03PM
(#21848826)
Infix operators are out of scope of my comment. I am only referring to method invocation syntax itself, x.a(y, z).b(v), being infix.
[ Parent
| on HN ]
Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra...
by xscott on Friday December 20, 2019 @10:07PM
(#21849338)
I misunderstood then. However, if you just meant that people prefer method syntax because method syntax is infix, then it seems to come full circle to asking why they like infix syntax for methods... Doesn't really matter - it is what it is.
Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra...
by SamReidHughes on Saturday December 21, 2019 @12:02AM
(#21849727)
Well, if you imagine some prefix method syntax -- let's say, foo[a](b, c, d) instead of a.foo(b, c, d) -- it misses out on one of the advantages, in that method chaining is easier to read. I mean this is a nice feature for function call syntax in general and the benefits of infix syntax is not specific to methods. This is one reason why some new languages make f(a, b, c) and a.f(b, c) produce the same AST. Anyway, I wanted to separate the effects of infix positioning of the method name from those of having distinguished syntax for method invocations, which with static dispatch still carries other advantages.