Name one thing wrong with this language without spurting memes

Name one thing wrong with this language without spurting memes
>you don't need the tip

Other urls found in this thread:

github.com/kostya/benchmarks
tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe
ddili.org/ders/d.en/functions_more.html
twitter.com/NSFWRedditGif

interpreted language so it is slow.

Lambda syntax is awful because muh LL(1) parser.
No null coalescing operator. The ternary if-else operator is a fucking joke.
Enums came too late so there's a bunch of libraries that take strings as arguments. It hurts code completion and makes it harder to find the right option without consulting the documentation.
CPython api is exposing too many implementation details so it's sometimes hard to make improvements to the language without breaking compatibility.
PyPy isn't given enough love.
PEP 484, while it is a nice idea, is actually a horrible hack. See forward references for example.

Python is my go-to language for pretty much everything.

Big.
...and slow

>see forward references for example
uh-huh...

Relies on whitespace for code blocks

>this retarded argument again
I'll bite. Why is that an issue? Would you not properly indent your code anyway?

i rather like this because if you have to look at someone elses code it is guaranteed to be formatted and blocked logically otherwise it wouldn't work

I get things done too quickly in python so they give me more stuff to do.

Typical Sup Forums's answers are
1) Muh whitespace
2) not compiled, therefore slow
3) Dynamically typed, so buggy

I love Python, btw.

does python not have something similar to strict mode in perl where it's "emulates" static typing?

__self__

__init__**

AFAIK, they added syntax to give hints to IDEs about the data types. Adding it as part of the language is in the works.

it's not javascript so it's shit.

significant whitespace
slow as shit
terrible backwards and forwards compatibility, not just 2 vs 3 but fucking 3.4 and 3.5 are not compatible

i do but how does
if foo == bar and \
baz != quux:

look to you?

Nobody writes it like that.

This is what pep8 recommends
if (foo == bar and
bar != quux):

>3.4 and 3.5 are not compatible

that was just an example, still doesn't make
(multiline
statements)

look better than
multiline statements
in C;

>le bikeshedding

this is a bait thread anyway, python obviously has objective flaws and benefits just like every other language

3.5 added new syntax for coroutines. 3.5 can run coroutines written with 3.4 syntax. It's backwards compatible.
Arguing that forward compatibility is an issue is stupid.

If your statement is too long to fit on one line then you have bigger readability issues than two extra parenthesis would cause.

>Arguing that forward compatibility is an issue is stupid.
it is when it's not between major releases

for one it's slow as fuck

>New features don't work on older version
S H O C K E R
H
O
C
K
E
R

now use @numba.jit and do 10k iterations of both

ugly syntax, forced whitespace, slow

not in repos, i don't want your special snowflake malware

Indentation is great.
But it's easy to accidentally add/remove whitespace.
IDEs can ensure properly formatted code with a single click/hotkey if braces are used, this cannot be done if relying on whitespace.
Tabs/spaces can become mixed when copy pasting from other sources. Doesn't matter if you prefer tabs or spaces, mixing them is a capital offense.
Cannot easily jump to the end of a code block without braces
It's a pain to correct whitespace - eg surrounding with it removing try catch

it may be under scipy in the repo

would python be good for a beginner?

...

it's faster but not fast
(if python can demand special snowflake shit i can also use compiler optimization)

forgot pic

Yes.

no it will teach a beginner bad practices

>jit the function but not the loop
You're really getting desperate.

can't any language do that? doesn't that always happen to beginners?

2.7

D is a fucking joke. Please take your dead language somewhere else.

Python is made for lazy people who aren't curious about how things work. It's like you call yourself a mechanic because you put air in your car's tires and loaded the rest of the car as libraries.

recommendation?

Depends. Are you a web dev or a programmer?

>python is made for people who want to get things done without reinventing the wheel every time
Sounds awesome. It will teach you programming and won't make you want to kill yourself at the same time.

After that you can go down to the metal with C.

>can't any language do that?

No

Just try teaching any web or javascript developer how to write decent code in C or C++. Try and teach him good OOP practices in C#

It's impossible. They learnt on a shitty "bash it until it works" fluffy interpreted dynamically typed shit language so they don't think like a programmer

web dev but looking to expand

list comprehension syntax could be better
[i for i in range(30)] -> [for i in range(30): i]

maybe for c but not c++ which is also bad about accidental copying and compiler trial and error

I just realized that I wrote "time ./test.d" instead of "time ./test"
D is now 0.3 seconds faster but still more than 15% slower than Python + numba.

Don't write slow code then.

Slow, ugly syntax

Here's my problems with it:
> shitty concurrency
> There's (Not) Only One Way To Do It
> horrible and inconsistent naming (e.g. ntohl, array.array())
> too many things are by convention
> regular expressions are not Perl-style
> object-oriented features are almost an afterthought

Python isn't a bad language, and most of the criticism against it is uninformed. A common example is speed -- it's trivial to add C or CUDA, and it's already faster than a lot of its direct competitors.

I prefer Ruby, but Python is one of the most useful languages one can know.

OOP in other languages: A complete understanding that variables and functions within the class block are members of the class

OOP in Python:
>self
>self
>self
>self

Don't even give me your 'explicit is better than implicit' shit, you brainlets

That is some ugly python code. You can tell you're not a regular user and only know the bare minimum to try and prove a point

Slow

DMD is shitty compiler

This is DMD and not optimized, and your pytrash is JIT'd with a neutered down python subset

it's been said, but it's slow. If you need performance at all, offload it to C.

>pyshit

rust vs C++ is a healthy competition though

Every text editor ever, can only jump to the end of a function by matching the opening brace

Pip downloads files and then requires large libraires to compile the c elements of code. Too often I have fallen back to apt-get to get a python lib installed. lxml is a great example of this

Literally ~100 times slower in comparison to any decent language

runtime isn't everything lad

...

>python is made for people who want to get things done without reinventing the wheel every time
this analogy is so stupid and I hear it so often here on Sup Forums
>python is made for people who want to drive a car but not learn anything that happens under the hood
would be a better more fitting one

let me know when bash can do matrix operations and create plots

>"y-y-you don't know anything! you wrote that code too quickly! You have to debug it for hours to really get a feel for how everything works!"

bash data structures are shit, start trying to use them and realize everything is n or n^2

No implementation that optimises tail calls
The syntax is a joke

Not as good as Ruby.

...

self.self.self.self.____________self____________

Implementations are slow as fuck

delete this->this;

The fact that the developers are split between using the old version and the new version
Why don't you just move on to the new one?

GameBoy could play most GameBoy Color games
if a vidya company can do it, why can't python??
checkmate atheists!

>@jit
you do realize D has full CTFE, right? If that's uses D will obliterate python and even C/C++ or Rust. Well C++ is getting constexpr soon so there is a competetion

thiiis let's stop with the fucking "python3" meme already, there's just python

Because it takes fucking forever for some libs to update. I generally use 3 when possible.
Also some people use pypy.

>0, "", {}, and [] are all falsy
why would you do this when your language has None and exceptions and a whole slew of proper types and is fairly static in that it doesn't convert them automatically unless in very specific situations.

>function returns an int or None on failure
>check if result: before proceeding
>fails when result is a perfectly acceptable int (0)

falsy values like that make sense in languages where you don't have exceptions or in loosely typed languages buy python is neither.

This is the reason why I mainly use java now. Projects that take one hour in python can easily be streched to a week on java. Java is also super verbose so you can make applications with several files and thousands of lines of code in java which would barely be 100 lines of code in python and possibly just a single function

Looks like D is still shit.

>you do realize D has full CTFE
That's not the point however.
The dfag said that Python is slow, which is only true if you ignore the plethora of options you have to speed Python up and pretend like CPython is the only interpreter.

>C++ is getting constexpr soon
C++ had extended constexpr since C++14.
Nothing is stopping you from adding a build step into a Python application that precomputes some values.

>function returns in an int, zero on failure
if result:
>function returns an int, None on failure
if result is not None:

That wasn't so hard, was it?

>C++ had extended constexpr since C++14.
Not standard. C++17 has standard constexpr, D has had this for ages, your @jit faggotry does not stand a shred of chance there

> D has had this
I meant CTFE, not the sorry excuse of compile time execution called constexpr that C++ has

As I said, if I'm using a hard to compute value in my program I'll precompute it in a separate build step regardless of the language.
Python's @jit faggotry currently outperforms D in this toy example.

>I'll precompute it in a separate build step
That only works for toy fizzbuzz programs. CTFE is much more powerful than that.
Python is like 100 times slower in complex programs

explicit is better than implicit for python.
Why? Because python != OOP. It is multiparadigm, so to be able to use polymorphism in a functional context it is better to make the passed objects explicit.

>__main__

You keep sperging about CTFE as if it's some kind of a unique feature when it has been a step in constant folding in many compilers for ages.
If your CTFE is so good then why doesn't it figure out that the return value of primes is a constant? As far as I can tell after a quick google search the main selling point is that it's automatic.

You'll have to try really hard to find a program where CPython is 100 times slower slower than D, even if you do find it, it will be something that pypy will easily bring reasonably close to D speeds.

>have some class members which take a this argument
>have some class members which don't take a this argument
>decide to invent some stupid keyword instead of just adding a this argument
It makes perfect sense, you're just a faggot.

Not our fault that these hipster sjw tumblinas insist on using ruby as a web framework

>why doesn't it figure out that the return value of primes is a constant?
That's because it hasn't been declared that it's constant and won't be changed, are you slow?
>python user
oh
> As far as I can tell after a quick google search the main selling point is that it's automatic.
No it isn't. Learn and research more before you embarrass yourself.
>You'll have to try really hard to find a program where CPython is 100 times slower slower than D
github.com/kostya/benchmarks

tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe
>There is no special set of the D language necessary to use this feature - whenever a function just depends on compile time known values the D compiler might decide to interpret it during compilation.
All the values are known at compile time yet apparently D is too stupid to figure it out.

>github.com/kostya/benchmarks
>Python version of brainfuck is representing an opcode as a full object with a name and a value whereas D is just using an enum
What's the point of this benchmark?

Yes but you didn't declare the result to be immutable or enum, and D compilers didn't do that automatically. D is not a hand-holding language like python, you have to give clear instructions to ensure CTFE.
ddili.org/ders/d.en/functions_more.html

>stops reading after benchmarks
You have the attention span of a 5 year old. Or you are just upset that pypy didn't save your ass in actual complex programs.

Also, enum is another way to invoke CTFE in D

fucking why

PER
FOR
MANCE

C++ compatibility

>you have to give clear instructions to ensure CTFE
So just like constexpr? How is CTFE any better then?

>stops reading after benchmarks
I'm not sure what else you expected me to read. I'm not going to go through every single one and explain why it's slow.

>you are just upset that pypy didn't save your ass in actual complex programs
No compiler will rewrite your algorithms. The fuck do you expect. If you write slow code it will run slow.
The way it's written in Python requires two pointer dereferences just to reach the opcode value.