Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python

Name: Anonymous 2010-08-08 20:23

Why is there FORCED INDENTATION OF CODE in python?

Name: Anonymous 2010-08-08 20:24

Because.

Name: Anonymous 2010-08-08 20:26

Well structured code is one part of writing beautiful code. This idea was designed into the language.

Name: Anonymous 2010-08-08 20:31

>>3
And isn't part of that beauty the difference between everybody's styles?

Name: Anonymous 2010-08-08 21:38

>>4
I wouldn't know. I'm very flexible and tend to ignore trivial details like bracket placement and padding. As long as the codebase style is consistent and not rage inducing, I don't really care for any style.

Name: Anonymous 2010-08-08 21:45

>>4
The only style differences that could reasonably be considered merely a matter of opinion are the positions of curly braces. Python doesn't have those, so it's a moot point.

Name: Anonymous 2010-08-08 22:21

>>6
What about spaces in places like while (true), or some variant thereof, as opposed to just while(true)?

Name: Anonymous 2010-08-08 22:48

Forced indentation of code makes python nicer to look at, at the cost of flexibility. Since making code cleaner was a goal of python it's understandable.

What I wonder is why /prog/ never talks about the FIOC in Haskell?

Name: Anonymous 2010-08-08 23:45

>>8
Anyone who would complain about Haskell's indentation is probably too put off by the type system and busy whining about that.

Name: Anonymous 2010-08-08 23:45

>>8
alignment ≠ indentation

Name: Anonymous 2010-08-09 1:09

>>10
Sounds like a cop-out.

Name: Anonymous 2010-08-09 1:34

>>7
Python has no restrictions there.

>>8
at the cost of flexibility
You can also just use semicolons and escape newlines, at which point indentation is no more syntactically significant than it is in any other language.

Name: Anonymous 2010-08-09 7:09

Would one consider a language still dynamically typed if FIOC is a (sub) goal of Python?

Sounds to me like                   IHBT!!!                                                      

Name: Anonymous 2011-02-03 1:35

Don't change these.
Name: Email:
Entire Thread Thread List