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

Pages: 1-4041-

FORCED INDENTATION OF CODE

Name: Anonymous 2010-07-15 6:47

It's not that big of a deal.


1. You don't even have to indent, a good python editor will indent for you.
2. You should be indenting anyway


If you skip learning python simply because you are afraid of indenting, then you are a fool.

Name: Anonymous 2010-07-15 6:54

ONE WORD GET OUT THREAD OVER

Name: Anonymous 2010-07-15 6:55

>>2

I don't understand. That wasn't one word...

Name: Anonymous 2010-07-15 6:58

>>3
Σ(゚Д゚ ) < Contact the meme authorities post haste!

Name: Anonymous 2010-07-15 6:58

Wasting 90% of space screen like a bad version of QBASIC
Invisible indentation bugs
Any text conversion can screw up the code
Slow as fuck and gobbles memory like a rabid snake(a python is fitting metaphor).
Guided by King Guido van Rossum. Dissenters are told to repent for their unpythonic ways and get lost.
Predictably there very few good python engines(stackless/Cpython) and they too suffer from language limitations like Global Interpreter Lock

Name: Anonymous 2010-07-15 8:28

The real problem is that people thing that eight-space tabs are a good idea.

Name: Anonymous 2010-07-15 8:31

>>6
They are the standard.

Name: Anonymous 2010-07-15 8:34

>>7
According to Lunix "I am right because I am right" Tornballs.

Name: Anonymous 2010-07-15 8:39

The real problem is that people thing that eight-space tabs are a good idea.
This man speaks the truth. When will the world realise that the 3-space standard, as advocated by the "TROLLGOL STEERING COMMITTEE", is the superior choice?

Name: Anonymous 2010-07-15 8:41

>>1
Shitty troll, or shitty meta-troll?

Name: Anonymous 2010-07-15 8:42

>>8
No tabs should be anything but a multiple of 2 * spaces in length.
No function that takes arguments that could span multiple lines is less than 4 characters wide:
printf ("Hello\n"
        "<- That was a tab!\n");

Nobody in their right mind would waste source code size with multiple tabs.
Even in an 80-column terminal (to encourage terse, yet still legible code) 8-width tabs are not a problem.

Ergo, 8 tabs is optimal.

Name: Anonymous 2010-07-15 8:51

>>11
you shouldn't use tabs for alignment, because it will break if someone views your code with a different tab size. tabs should only be used for indentation.

Name: Anonymous 2010-07-15 8:56

>>12
But that's why there is a standard tab size. What do you think should happen if a statement overruns the width of your terminal?

Name: Anonymous 2010-07-15 9:24

>>13
my terminal is 1920 pixels wide, so that's never happened.

Name: Anonymous 2010-07-15 9:29

>>14
That information is irrelevant, especially if you're using a 12px+ font.
I bet it isn't monospace, either.

Name: Space Marine 2010-07-15 9:47

Oh you silly tab people.

Name: Anonymous 2010-07-15 9:47

>>15
190 columns should be more than enough for any code.

Name: Anonymous 2010-07-15 11:15

Standards are for morons. Next you'll tell me that murdering is wrong and we shouldn't cross road on red light. Tab should exactly 1 space long. This way we'll free one key on our keyboard for our pleasure.

Free key!

Name: Anonymous 2010-07-15 11:20

i have worked in maine, new hampshire, new york,utah, colorado,florida,bahamas.
never indented my code!

Name: Anonymous 2010-07-15 11:31

Nobodycares!

Name: Anonymous 2010-07-15 11:31

Tab size of 4 for all my code. OCD begs it and I've never seen the point in changing that.

Name: Anonymous 2010-07-15 18:00

>>14,17
It's a good thing no one else has to look at code but you on your monitor and your terminal; ergo your wrong bitch

Name: Anonymous 2010-07-15 20:32

>>11

I used to use 8-space tabs in all my C code.  Every once in a while (like 1 out of 50 functions I wrote) it resulted in nasty stuff way over to the right, but some of those functions (like hand-written parsers) were *important*.

Then I started writing code that called into libraries.  Shit like "pango_font_description_set_family_static", "CTLineCreateWithAttributedString", and "GL_CLIENT_VERTEX_ARRAY_BIT".

So I switched to 4 spaces per tab, and made my editor use spaces so other people can read my code correctly.

Name: Anonymous 2010-07-16 0:11

Tabs have no fixed size/width.
If your code requires a tab being 8 spaces you're abusing tabs and should fix it immediately.

>>13
There is no standard tab size. That's the whole point of them.
What happens to long lines is the editor's problem.

Name: Anonymous 2010-07-16 3:44

I use a tab size of 8 and don't substitute them for spaces. Anyone who doesn't use that as well doesn't deserve reading my code anyway.

Name: Anonymous 2010-07-16 5:07

>>25
Are you saying your code is unreadable if you change your indentation spacing?

Name: Anonymous 2010-07-16 5:59

>>26
Mine isn't (not >>25) but I've written so much in 8-char tabs that if I switch now, it'll all look ugly and alien to me.

Name: Anonymous 2010-07-16 6:03

Forgot my age!

Name: Anonymous 2010-07-16 6:03

Mine is 24.  Been on the internet since 12.

Name: Anonymous 2010-07-16 6:03

>>28
12

Name: Anonymous 2010-07-16 6:08

>>30
Thanks man, knew it was something.

Name: Anonymous 2010-07-16 18:56

>>26
Sometimes, as in argument lists spanning broken up in mroe than one line or other very specific cases.

Name: Anonymous 2010-07-16 22:25

Why use tabs when your code doesn't look right with other tab widths anyway?
There is no advantage to using spaces except that your code will compile a little faster (and generate faster code) because the it doesn't have to read/parse as much data.

Name: Anonymous 2010-07-16 22:31

>>33
This. Tabs were more important back in the old days of 16-bit computing and the 1MB memory limits of pre-EMS/XMS DOS.

Most large, multi-developer projects I've worked on lately mandate indentation of 4-space characters for source files.

The only exception would be HTML/XML markup that is served over the internet, but generally, smart people strip out the white space and/or use gzip as the encoding anyway.

Name: Anonymous 2010-07-17 2:18

>>33
There is no advantage to using spaces except that your code will compile a little faster (and generate faster code) because the it doesn't have to read/parse as much data.
generate faster code
IHBT

Name: Anonymous 2010-07-17 3:03

>>35
Are you kidding me, nobody can be troIHBT

Name: VIPPER 2010-07-17 3:24

OP you are JEWS

Name: Anonymous 2010-07-17 5:52

>>35
It's true that there won't be much difference, but there will be a difference.

Name: Anonymous 2010-07-17 6:01

>>38
Why would there be a difference? In most languages whitespaces is merely disregarded. In languages with significant whitespace, it has meaning, but in the case of spaces vs tabs, the whole thing is irrelevant. Since both cases should parse to the same AST, they will generate the same code, so there is no difference. The difference is during READ time (lex/parse), but it should have no impact on code generation.

Name: Anonymous 2010-07-17 7:15

The difference is during READ time (lex/parse)
Like I said. A difference but not much of a difference. /pedantic

Name: Anonymous 2010-07-17 7:55

>>40
I don't think >>35 was taking issue with the faster compilation aspect of >>33, but rather with the claim that the generated code will be faster.

Name: Anonymous 2010-07-17 13:04

>>41
the claim that the generated code will be faster.
It's due to race conditions in the compiler where certain parts of the code will not have been parsed in time and thus do not enjoy the earliest optimizations applied.

Name: Anonymous 2010-07-19 18:51

>>40
Yeah? Well I remove all newlines and spaces from my code too (except inside strings lol) and I get really fast compilation times

Name: Anonymous 2010-11-26 8:59

Name: Anonymous 2011-02-04 16:38

<

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