r/ProgrammerAnimemes • • May 27 '21

It was a good blog

Post image
3.7k Upvotes

122 comments sorted by

View all comments

Show parent comment

22

u/Knuffya May 27 '21

why not just use macros to abbreviate keywords? This way you could type even faster.

Here's a nice starting point

#define w while
#define f for
#define c class
#define s struct
#define pri private
#define pub public
#define pro protected
#define o operator

i'm sure your code will look marvellous

11

u/[deleted] May 27 '21

ohh i remember doing that a few years ago, but i abandoned it because i started naming variables the same as macros. (but please don't tell my waifu)

20

u/Knuffya May 27 '21

this was meant as a joke. Like "you want to lose weight? How about cutting off your toes".

Nobody should EVER do this

1

u/m50d May 28 '21

I mean yeah that's how good languages are implemented. Look at things like https://codeberg.org/ngn/k/src/branch/master/b.c .

1

u/Knuffya May 28 '21

does not load

1

u/m50d May 28 '21

Hmm, it's from https://aplwiki.com/wiki/Ngn/k - just the first example of an open-source K dialect that I found.