python seems so easy

Pages: 12345
When you're complaining about having to indent properly I don't think you have experience.
I know how do indent properly, but sometimes I'm really picky on indents. For example:

I like this
1
2
3
4
5
class MahClass
{
    public:
        // Code
};


better than this
1
2
3
4
5
class MahClass
{
public:
    // Code
};


And VC++ automatically does the latter, and this gets on my nerves. I feel it takes time away that I could have been using to make my code more efficient/add more to.
closed account (Dy7SLyTq)
python doesnt suck. just because you dont like it doesnt mean it sucks. i think ruby is horrible (for me). python is by far better than java, having done projects in both "langs". ive found that the people who dont like it treat it as c(++) but you have to recognize its its own language and then youll see that it is like c
No it isn't. Python is inferior to all languages I know about, besides those crappy web langs.

Python is nothing like C.
closed account (Dy7SLyTq)
web "langs" arent crappy, and python is like c. it is not inferior to all languages. if you could provide some examples of how? i have build a parser and a web crawler which worked flawlessly
Web langs suck IMO. Python is a completely different language than C. I hate Python. As I said before that's only my opinion. No need to argue about if my opinion is "right" or not. Same thing happens on Youtube.
closed account (Dy7SLyTq)
Web langs suck IMO. Python is a completely different language than C. I hate Python
alls im asking is some examples proving your point
"python seems so easy"
2013 - 2013
RIP
The indentation thing and they dynamically typed values. That's wrong with all languages that have those features. That's why I hate it the most.

Not to mention many people think Python is the best language in the world.
Last edited on
@L B Why rest in peace? He never changed his mind on if it's harder now.
FredBill is a tard. End of story.
How? Just because I have an opinion?
Last edited on
Python is a pretty cool language, though the whitespace thing is definitely problematic. Especially in multiple developer environments (are they using tabs or spaces?)

At my last job, the tab/space confusion repeatedly led to errors for many developers.

Other than that, I think it's a pretty slick language.

Its simplicity is deceptive, though. I mean it's easy to write a hello world and to jot down basic structures (which is the whole point), but if you want to do something involved, you have to understand how it works on a lower level or it bites you in the balls. In the end setting up a full structured program skeleton in Python isn't much easier than doing it in C++ ... although writing the "meat" of the program does tend to go much faster.
Last edited on
closed account (S6k9GNh0)
Disch, python, if I remember correctly, defines it as "whitespace" and whitespace is defined as at least one or more, including mixtures, of spaces and tabs, in the same order.

In example, you can have:
<space><space><space><statement>
<space><space><space><statement>

or
<tab><statement>
<tab><statement>

but not:
<space><tab><space><statement>
<tab><space><space><statement>

white space can be of any length but must be the same throughout a block of code. It asks for consistency and in the manner it asks it in, it's easy for formatting tools to automate this so a group effort doesn't really need to feel pain from having different tastes.
Last edited on
I'm a little anal when it comes to things. Unfortunately, one thing has hit my nerve. I have been programming in some form for 17 years now. While I admit I have confidence issues, I can say I have dabbled with quite a few languages. In the years I've been doing this I've used in one way or another (ie used or dabbled) BASIC, Assembler, C, C++, C#, D, Java, Javascript, Perl, Python, Ruby, Lua, Php, CSS, HTML, XML, Lisp, Scheme, Haskell, Erlang, and a few others.

3 years experience, and you are complaining about something as minor as indentation. The one goof I do that makes me laugh is, because my largest amount of experience is using C and C++, when I start using one of the languages that use import, I catch myself putting #include still. For example, in Python I meant to do from sys import * and did #include <sys> without thinking. That issue is just superficial though. Same with indenting. If you have a good IDE (like Geany, which is available on all OSes and free) you can select the language being used (in Geany it is Document->Set Filetype then categorized languages) or save the file with the proper type (.py) and the editor will do the indents for you.
I'm aware of all that, computerquip. This:

<space><space><space<space><statement>
<tab><statement>

Is what was happening. If you have tabs set to 4 spaces in your text editor, they will look identical unless you turn on the "show whitespace" option so you can actually see spaces/tabs.

Yes, text editors can auto format. But no, it's not fullproof (copy/pasting for example, often doesn't reformat the entire pasted block).

It didn't help that the job did not enforce any particular editor on the developers, so everyone was using their own preferred editor.

Code slipped into the codebase that was completely broken and not executing because Python silently ignored large chunks of code due to it being indented differently. It took several manhours to find/fix.

Say what you will.. but in my opinion that is a huge, gaping flaw in an otherwise fascinating language. IMO... if you're going to say whitespace matters, you should formalize how you want whitespace to be defined. IE: indentation must be tabs only, spaces will throw an error (or vice versa).

Of course it's too late to do that with the language now.


EDIT:
BHXSpecter wrote:
3 years experience, and you are complaining about something as minor as indentation.


I know you posted before me... but it's not minor when it silently destroys code and/or prevents it from running. It's a major problem that can cost a lot of time and money to solve.
Last edited on
Guys, FredBill is young and naive. Give the kid a friggin break. :P

Also, obligatory: http://xkcd.com/353/
Disch wrote:
I know you posted before me... but it's not minor when it silently destroys code and/or prevents it from running. It's a major problem that can cost a lot of time and money to solve.

I didn't mean minor to the language, but minor to the experience. Someone with one year of experience wouldn't be bothered so much by doing required indentation. I mean what is so hard about:
1
2
3
while True:
      for():
            print "Something would have happened if you entered the code completely!"


Cheraphy wrote:
Guys, FredBill is young and naive. Give the kid a friggin break. :P

This is a break, and we have been giving him breaks since he joined.
I just don't want to be limited to one coding style. I feel I'm going to hate writing code a certain way.
I just don't want to be limited to one coding style. I feel I'm going to hate writing code a certain way.


Then you are going to hate working anywhere because they are going to have coding standards and expect you to follow them.
Pages: 12345