6 ms·
> I thought that by now it was universally accepted that having clear rules is a good idea, see Python and golang) It is far from being generaly accepted, see
by ajuc 12y ago
> I thought that by now it was universally accepted that having clear rules is a good idea, see Python and golang)
It is far from being generaly accepted, see Clojure, Scala, Rust, Ruby, ... I'd say more new languages don't follow this than do. And despite general love for Python its most controversial feature is exactly this.
- kibwen 12y agoRust has had formatting rules in the vein of PEP 8 for years now, and I'm hoping that an automatic rustfmt will emerge sometime between tomorrow's alpha release and the stable release a few months from now.
- steveklabnik 12y agoYes, we absolutely want a rustfmt. There's just been higher-priority work to do, and some conventions are still settling out. Gotta know what to format to before you can build a formatter!
- mhd 12y agoAnd the introduction of mandatory fixed formatting for go (in the name of making semicolons optional) wasn't without some opponents either, if I remember correctly, even in that rather obedient fandom.
- _pmf_ 12y ago> It is far from being generaly accepted, see Clojure, Scala, Rust, Ruby, ... I'd say more new languages don't follow this than do. And despite general love for Python its most controversial feature is exactly this. Maybe, but the question is whether they are better off or worse off for it.
- ajuc 12y agoI'm happy with either python-like, lisp-like or c-like syntax, just ban tabs if you use python syntax please.
- kmicklas 12y agoRegardless of the relative merits of tabs vs spaces, tabs make the most sense _specifically in a Python-like language_.
- ajuc 12y agoI don't care about tabs vs spaces, I just don't want to have the "inconsistent identation" problem, and spaces are more fundamental (you can convert arbitrary tabs to spaces, you can't convert arbitrary spaces to tabs). Also you cannot forbid spaces in code, but you can easily forbid tabs.
- kbenson 12y agoNo, actually the question was whether it's universally accepted as a good idea. Obviously it isn't (universally accepted). No need to turn this into a discussion of the merits, that's been done here many, many times before.
- Profpatsch 12y agolel, of course everyone is going to discuss about the smallest critique I stated. Bikeshedding at its best.
- ribs 12y agoYou did lead with that one.
- steveklabnik 12y agoRuby effectively has a standard format, the only significant diverging style is Seattle Style. It's true that there might be some edge cases, but the vast, vast majority of Ruby code looks the same.
- vorg 12y agoRuby has different styles named after cities, does it? A standard (Tokyo ?) style and a Seattle style? Perhaps we should add the London style, named after Groovy because Groovy's essentially a carbon clone of Ruby except for syntax.
- steveklabnik 12y agoJust Seattle. Members of Seattle.rb do a lot of Ruby infrastructure work, and were around before Ruby really blew up in the states.
- baldfat 12y agoAfter moving from Python and its "clear rules" of having one and only one obvious way of doing things to programming in R. I like R and the flexibility of have many different ways of doing anything. What you lose you gain with quick evolving libraries and work flows. R is light years past where it was just five years ago and Python is still stuck at trying to go from 2.7 to 3.4. R has gone from R 1983 to a fast adapting language due to the flexibility of how you can do something.