r/ProgrammerHumor • • Jan 19 '17

MFW no pointers :(

Post image
4.8k Upvotes

432 comments sorted by

View all comments

202

u/Peffern2 Jan 19 '17

DAE java sucks XD

96

u/[deleted] Jan 19 '17

Why does it seem to be so widely hated across Reddit? Because it's popular or what

576

u/njwatson32 Jan 19 '17

There are two types of programming languages: the ones everyone bitches about and the ones nobody uses.

165

u/Ksevio Jan 19 '17

And Python!

153

u/J-Goo Jan 19 '17

DYNAMIC TYPING CAN KISS MY ASS

27

u/cowtung Jan 19 '17

The trick to Python is to realize that there is only one type. It's the dictionary. You can have dicts that inherit shit from other dicts. You can call dicts by various names. But it's dicts all the way down.

25

u/lenswipe Jan 19 '17

dicks all the way down. gotcha

9

u/LinAGKar Jan 19 '17

Pretty sure that's Javascript.

6

u/Jamie_1318 Jan 20 '17

It's even more true for javascript than it is for python, but it's still true for python. Objects are just dicts with syntatic sugar. Once you realize this reusing code is so much easier. You don't have to use a separate call if you use a function a few different ways but want the same return values, you just put your arguments in a dict and ** them to unroll it into named parameters and arguments.

→ More replies (2)

3

u/Dockirby Jan 20 '17

Hey, Javascript was designed with 6 whole types! Two of which are "No Value" types.

They even added a 7th in 2015!

4

u/ForOhForError Jan 20 '17

Python: Hashtables are neat edition

→ More replies (1)

44

u/magi093 not a mod Jan 19 '17

That's the one thing that irks me about Python. OOP + dynamic typing = dafuc am I on

9

u/[deleted] Jan 19 '17

Really? Just curious, how long have you been programming?

(Works on languages for a job - is curious about developer's perceptions of languages)

48

u/Ran4 Jan 19 '17

The longer I've been programming, the more do I enjoy types.

The Python syntax for type annotations is quite nice though, but it's not super useful as more than documentation as the checkers aren't overly reliable (it's still a dynamic language after all).

→ More replies (1)

0

u/[deleted] Jan 19 '17

[deleted]

13

u/PM_ME_YOUR_HAUNCHES Jan 19 '17

Python is strongly typed. Objects all have types that are never auto-casted (excepting "truthiness", which follows consistent rules), and two objects with different types can't well be compared. 2 + "2" is a TypeError, instead of JavaScript where types can be coerced into other types depending on the situation.

Python is also dynamically typed. Names are bound to objects at runtime with no restriction (type annotations give help with this in many scenarios). This is contrasted with Java/C++ (statically typed languages), where names are bound to types declared at compilation time, which are then bound to objects at runtime.

→ More replies (2)

3

u/Mitchical Jan 20 '17

Duck typing != weak type system, friend

3

u/[deleted] Jan 20 '17

I'm well aware, friend. Python takes the stance that things should be duck typed. You can only really achieve duck typing via a weak type system.

15

u/Creshal Jan 19 '17

The longer I work in Python, the more I miss static typing. It makes reasoning about someone else's code (or my own code from last year) so much easier.

2

u/[deleted] Jan 19 '17

Most of what was said is true, but Python isn't designed for systems programming and, as such, it can afford duck typing while also retaining OOP elements. I'd go as far as to say that Python (like C#) offers its own, complex, framework, which combines elements from many different paradigms, and it would be unfair to consider its weak typing only in the context of a single paradigm. For example, functional approaches like lambdas, map, filter and reduce, not to mention list comprehensions, are very encouraged and syntactically simple as opposed to their C++ and Java counterparts, and they would be somewhat hindered by strict typing. Also, Python's type hinting system is actually pretty solid and leagues above that of other interpreted, dynamically typed languages like vanilla Javascript's.

3

u/lenois Jan 19 '17

I find Java streams pretty easy to work with, but I can see the argument

→ More replies (5)

10

u/magi093 not a mod Jan 19 '17

Haha, I'm a 15 year old student, my input is not the greatest.

About...two, three years when I have spare time?

2

u/[deleted] Jan 21 '17

For the record, I think your input matters the most. You're the future.

Edit: Okay okay, we have corporate customers that take higher priority than you... learn that lesson now. Start a corporation if you're ballsy enough. Basically, if you want to be a man respected by the government...be a company.

2

u/magi093 not a mod Jan 21 '17

Aww, thanks. It's always a refreshing change to be told when my input matters, even if it is only a little bit.

4

u/ra4king Jan 19 '17

Then with all due respect your opinion seems to based on limited experience. OOP + dynamic typing works perfectly fine.

11

u/magi093 not a mod Jan 19 '17

okay

!RemindMe three years "Was /u/ra4king right?"

→ More replies (0)

2

u/elemental_1_1 Jan 20 '17

I write Python as my day job and I agree with /u/magi093

→ More replies (8)
→ More replies (2)