Making STDIN consistently the default input stream and STDOUT consistently the default output stream is right – any inconsistency there is just an oversight. Could you open an issue? I don't care for the renaming to readln myself. I've often considered the idea that lines should be chomped by default but there is something really nice about the fact that you can just print all the lines you get and the output is identical to the input.
> On Apr 12, 2014, at 4:35 PM, Jeff Waller <[email protected]> wrote: > > TL;DR Let's start with some golfing. > > Compact Expressiveness: A term I've coined; maybe it already exists, but > don't bother looking it up, I didn't, > > In the case of programming languages, loosely, I'm talking about getting the > most out of fewest number of expressives (another term). Concretely, what > is smallest number of expressions, statements, characters, etc that a > language requires to get any job done? The theory is this is important; the > more compactly expressive a language is the better, but only up to a point > after which it becomes unreadable. > > As for me, I've arrived at Julia from machine learning, I like it; I'm new at > it. From above, I think it's expressive, but could benefit from being more > so. I think I see what you guys want to do with it, and it does look to be > an improvement over R, Python, Mathematica, Haskell Octave, MATLAB in terms > of features and speed or at least on it's way. I think also it's roughly > about as compactly expressive as these languages with some big exceptions. > > So the idea is. Play golf on Stack Exchange, see how Julia compares, suggest > improvements based on results. I don't expect using Julia will win against J > and Golfscript in a least number of characters competition, but would expect > it to compare with Haskell and tend to win over Python and R. Currently it's > not compact enough to do so consistently. I think probably because It's less > mature and so is missing some nice short-cuts and mechanisms for data > conversion. > > As an example > > readline(stream=STDIN) > readlines(stream) > > Suggest: readlines should default to using STDIN like readline > Suggest: that the default behavior of readline is to not include the '\n'; > make it equivalent to chomp(readline()) > Consider: readline --> readln > > Specifics above where inspired from trying to play code golf for a particular > problem, but illustrates the general idea. > > thoughts? > > -Jeff
