lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jul 5, 2017 at 12:52 AM, Viacheslav Usov <via.usov@gmail.com> wrote:
> On Tue, Jul 4, 2017 at 7:02 PM, Sean Conner <sean@conman.org> wrote:
>
>> > are familiar with functional syntax and the characteristic "reversal".
>
>> That's surprising to me.  At work, I've had to explain closures and
>> functional programming.
>
> Functional syntax is not functional programming. I actually meant function
> call syntax and chaining as is common in procedural programming,
> specifically that h(g(f(x))) is widely understood to mean that x is fed to
> f, its result to g, and its result to h.
>
> The C++ iostream thing comes to mind as an attempt to use "arrows" instead
> of functions. I have not met a single C++ programmer who has not attempted
> to avoid it, usually by going to the C language IO library.
>
> Cheers,
> V.

You have now: I like it. And in fact I think the community of
developers that likes it is larger than you imagine, because Qt
replicates the syntax for not just I/O but putting stuff in containers
too.

The reason people go for printf instead of iostreams is that format
strings are a lot easier to use when you need to do formatting,
because the STL's formatting tools are blah. On the other hand,
iostreams don't corrupt memory if you make a mistake in labeling a
data type.

/s/ Adam