[julia-users] Re: Style Guideline

2014-01-02 Thread Marcus Urban
Do people using Julia really like underscores that much? I find them generally unsightly, and I do not plan to use them.

[julia-users] Re: Style Guideline

2014-01-01 Thread Johan Sigfrids
Go's approach to style is interesting. Besides having a language designed so that there usually is only one correct way to do things, when you install Go it installs a go fmt tool that can reformat text so that they follow the style guidelines. Then you can setup your text editor to

Re: [julia-users] Re: Style Guideline

2014-01-01 Thread Daniel Carrera
I don't know about R (and I will read the article you linked to) but what you said made me think of the mess in PHP function names. For instance: * Half the functions are verb_noun() an half are noun_verb() * Half the functions use underscores, half do not. This means that it is very hard to

[julia-users] Re: Style Guideline

2014-01-01 Thread Andreas Lobinger
Hello colleagues, i was drafting a response to the original post, but this here seems to cover a lot of my points. I fully agree to automatic (re-)formatting. Annoying the users with style guides about where to put whitespace or tabs is sooo 90s... Wishing a happy day (and Happy New Year!),

Re: [julia-users] Re: Style Guideline

2014-01-01 Thread Brendan O'Connor
On Tuesday, December 31, 2013 2:05:06 PM UTC-5, John Myles White wrote: (7) + (8) These rules are part of the official Google style guides for R, which is the language with the most similarity to Julia that’s being used at companies with public facing style guidelines. I think they’re quite

[julia-users] Re: Style Guideline

2014-01-01 Thread Dahua Lin
John, Thanks for doing this. I agree with you that consistent code styles have lots of benefits. I read through your draft, and agree with many of the points there, except the following: (6) Never place more than 80 characters on a line. I agree that overly long lines hurt readability.

Re: [julia-users] Re: Style Guideline

2014-01-01 Thread Spencer Russell
On Wed, Jan 1, 2014 at 12:33 PM, Dahua Lin linda...@gmail.com wrote: I agree that overly long lines hurt readability. However, I think a hard threshold of 80 chars is too restrictive. Just take a quick skim of the Julia code base, you will find plenty of lines well beyond this limit (even

Re: [julia-users] Re: Style Guideline

2014-01-01 Thread Eric Davies
PEP8 has recently updated to allow for other preferences: Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the nominal line length from 80 to 100 characters (effectively

[julia-users] Re: Style Guideline

2013-12-31 Thread Steven G. Johnson
On Tuesday, December 31, 2013 11:12:44 AM UTC-5, Daniel Carrera wrote: (18)+(19): I disagree. Although I could favour rules like this in a particular project, in many cases I think that adding type annotations just creates syntactic noise and can create a needless limitation I also

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread John Myles White
(4) Using both tabs and spaces is a huge problem in a shared codebase. This is probably the only rule in my entire list that I’m actually going to enforce in the code I maintain. IIRC, Python completely forbids mixing these kinds of space characters at the language level. (7) + (8) These rules

[julia-users] Re: Style Guideline

2013-12-31 Thread Brian Rogoff
IMO the main reason for (33) is that Julia presently lacks any local import feature. At least a few languages with module systems add these; see for instance OCaml http://caml.inria.fr/pub/docs/manual-ocaml-4.01/extn.html#sec225 and also Ada, which allows with/use inside of blocks. Is there a

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread John Myles White
I could see a couple of nice uses for having the ability to do block-local imports, but I’m not sure if that would solve the problems that (33) is meant to address, which is that using importall makes it to too easy to accidentally monkey-patch Base and that using import sometimes makes it hard

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread Shashwat Anand
On Wed, Jan 1, 2014 at 12:35 AM, John Myles White johnmyleswh...@gmail.comwrote: (4) Using both tabs and spaces is a huge problem in a shared codebase. This is probably the only rule in my entire list that I’m actually going to enforce in the code I maintain. IIRC, Python completely forbids

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread Steven G. Johnson
On Tuesday, December 31, 2013 1:45:17 PM UTC-5, John Myles White wrote: Explicit typing isn’t the problem, no? From my perspective, the problem is incorrect typing, not typing per se. My proposal is that one should use explicit Any’s, which doesn’t seem to suffer from the issues you’re

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread Spencer Russell
On Tue, Dec 31, 2013 at 3:39 PM, Daniel Carrera dcarr...@gmail.com wrote: snip I don't think that argument holds water. At all. Google rules are not R rules, and R is not Julia. Companies and projects often have very specific style guides, while entire languages rarely do. I think that

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread Daniel Carrera
I do generally like the idea of a style guide, and I make an effort to follow the existing style guide in the manual. Maybe we should see which of John's proposals have wide appeal and add those to the existing style guide? http://docs.julialang.org/en/latest/manual/style-guide/ For example, I