lua-users home
lua-l archive

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


One of the first things you do when learning to program is simple IO.

Try to write printf yourself. In C without any libraries except the ones you may choose to write while implementing printf.

I have seen OO's answer to printf. That was funny. both in C++ and in Java early on. If you don't like printf or its ilk - which encode their state machines in a readable format - what do you like? I think you haven't yet thought it through from the viewpoint of the programmer who is not a language nerd.




On Tue, Aug 13, 2013 at 6:18 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2013/8/13 Jay Carlson <nop@nop.com>:

> What time.Format and printf/scanf have in common is that they use
> raw strings as little languages compiled and evaluated at runtime.
...
> I don't know about you, but in this case I think expressing structure
> as structs seems a lot more painful than just chucking everything into
> a string.

>From the title, I thought you were inveighing _against_ printf/scanf.
>From the message itself, it seems you nevertheless regard them as the
lesser evil.

Or am I misunderstanding you totally?