Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

le

Name: Anonymous 2013-08-15 19:02

I wish languages let you choose infix, postfix, or prefix freely.

Name: Anonymous 2013-08-16 18:23

>>3
In my opinion OOP has demonstrated that postfix/infix can be more easily read and shows transformation of data with the method chaining. You can simply read left to right.

e.g


[1,2,3].map(x => x * 2).filter(x => x > 2).forEach(print)


In contrast, prefix form.


forEach(print, filter(map([1,2,3], x => x * 2), x => x > 2))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List