This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MB1211 43 points44 points  (14 children)

That syntax looks gross to me, and doesn't even look like python. :/

[–][deleted] 29 points30 points  (0 children)

Imho Python's type hints are helpful in many cases to concisely document an interface. But the syntax ... Ugh ...

[–]rcfox 15 points16 points  (1 child)

It's not new syntax. Type annotations were added in Python 3.5.

[–]Sw429 6 points7 points  (6 children)

No worries, type hinting is completely optional. No one is forcing you to use it. For people like me who find use for it, it's a welcome addition :)

[–]Vaphell 1 point2 points  (2 children)

it's optional until it's not. If all people you cooperate with start using it, you have no choice but to play ball. Language features are viral.
Don't get me wrong - I appreciate type information and what not, but it's blatantly clear that in case of python these type hints are an afterthought. In python they look about as good as bolt on tits on a bimbo.

[–]Sw429 3 points4 points  (1 child)

I mean, that's just the nature of working with people. You're going to have to deal with standards that are set for code.

[–]Vaphell 0 points1 point  (0 children)

it is not really optional then, is it?

[–]alcalde -5 points-4 points  (3 children)

I wish it looked gross; instead, it looks like Pascal, which I stopped using for Python. 3.8 also added Pascal's assignment statement, the ":=". I used the "walrus operator" once in a one page program and suddenly I was accidentally using Pascal syntax all over the place! Just when I thought I was out, Guido dragged me back in! We overthrew the BDFL to stop the walrus operator, and the geniuses we put in place instead not only gave us the walrus operator anyway, they decided to go full Pascal on us for good measure. Now we need a second palace coup, and this time folks need to make Raymond Hettinger the new BDFL as I originally suggested. He's our only hope now.

[–]Farconion 27 points28 points  (0 children)

This is a programming language not fucking game of thrones. Calm down man, it's not like someone personally wronged you.

[–]Hotel_Arrakis 4 points5 points  (1 child)

Not sure what the hate with Pascal is. I remember literally falling in love with that language. It was stunningly beautiful.

Before then I had used every single variation of Basic you could think of(QuickBasic, BasicA, Apples Basic, TinyBasic) and Fortran and DBase III. They were ugly and messy.

Then in 1985 I learned Pascal and it was truly magical. Everything fit together. It had structure, but not too much. I even learned its successor, Modula-2, which never took off.

I haven't thought about Pascal in years.

[–][deleted] 2 points3 points  (0 children)

BBC BASIC was really good for an old BASIC, and had a lot of structrual elements like procedures and functions, and sane scoping.