<div dir="ltr"><div dir="ltr">Em seg., 19 de fev. de 2024 às 14:08, Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>> escreveu:<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><font size="4" face="monospace">One can make a reasonable case for "write a line / read a line"
      being sensible primitives.  They are simple enough: no parsing, no
      deciding what to throw away, no possible errors other than EOF, it
      is clear what state you leave the stream in.  These may not be
      what the student wants, but they are primitives a student can deal
      with without having to understand parsing and error handling and
      statefulness yet.</font></div></blockquote><div><br></div><div>I feel that, though in appearance the discussion is about words like "read" or "print" or "input", which convey actions, the core of the issue is what primitive data format is going to have ready-made composable parsers/assemblers. To me, as you seem to suggest, "read line" is not about the read, it is about the line, a concept incredibly simple which hides enough complexity to turn a line parser into a trap for the unwary. For similar reasons, I appreciate class Properties' method load, which provides an extremely quick way to do "property maps" when needed. For these reasons, I think that the way for beginners is not actually about reads or writes, but about line streamers.</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>