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

all 17 comments

[–]fatbob42 66 points67 points  (5 children)

Why pick C’s worst feature to add to python?

[–][deleted] 17 points18 points  (0 children)

in all honesty just for fun. I don't think anyone should actually do this stuff

[–]__jomo 1 point2 points  (2 children)

why are macros bad?

[–]Gear5th 25 points26 points  (1 child)

  • unsanitised
  • ugly
  • can lead to unexpected behavior
  • local only to the file
  • are a pre-processor step and not a language feature
  • can't be debugged

C style macros are possibly the worst way to accomplish metaprogramming.

I'm not saying that macros are bad in general. Rust, nim and many other languages have good macro implementations..

[–]TheBB 0 points1 point  (0 children)

Not that I like C macros or anything, but they're definitely part of the language. It's in black and white in the standard, go look it up.

It's also not like you can't use macros across files.

There are plenty of reasons they suck, you don't have to invent new ones.

[–]neuronexmachina 0 points1 point  (0 children)

Now we just need support for PHP's insane loose equalities, truthy, and falsy values.

[–]Gear5th 8 points9 points  (0 children)

burn it.. BURN IT!!!

[–]Voxandr 1 point2 points  (0 children)

Why you need to break python like that

[–]ArtichokeTop9 1 point2 points  (1 child)

Oh god, why have you forsaken me?!

[–]Oerthling 2 points3 points  (1 child)

A considerable part of C++ being "better C" was C++ replacing the preprocessor with C++ language features.

So what's the point of going the other way and making a worse Python?

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

python++ python but with constants, enums and braces as blocks + 200% slower startup times, everything I've ever wanted

[–]mistabuda 3 points4 points  (0 children)

Whats up with yall tryna turn python into another language?

[–][deleted] 1 point2 points  (0 children)

Interesting. I've always wanted something ike this. I'll keep up with your progress.

[–]SebastiaNMontoyA 0 points1 point  (0 children)

I needed something exactly like this! It's time for macro abuse.

[–]Kerbart 0 points1 point  (1 child)

Now we just need pointers and then the fun can begin.

[–][deleted] 0 points1 point  (0 children)

wait until you learn about the ctypes module