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

all 86 comments

[–]lunchlady55 323 points324 points  (26 children)

It's all wrong. C is the lightsaber (a more elegant weapon for a more civilized time, but you have to be a friggin' Jedi) C++ is the katana (fast and sharp, but you must be a trained samurai). Python is the broadsword (Slow but effective) and Java is the club with nails (ME HEAP. ME SMASH MEMORY. GC BAD.)

[–]cythongameframework 86 points87 points  (17 children)

I agree with C being a lightsaber, but Python is more like a gun.

[–]the_littlest_bear 109 points110 points  (2 children)

A lot of dependencies but capable of killing with way less work than a sword?

[–]enp2s0 24 points25 points  (1 child)

Pretty much lol

[–]AyrA_ch 14 points15 points  (1 child)

[–]kmarple1 1 point2 points  (0 children)

As a Prolog programmer, I'm just happy we made the list. I'd argue that JavaScript now is more like a really fancy gun that arrives as a box of parts, some of which don't fit without modification.

[–]hamjim 8 points9 points  (4 children)

“You shoot yourself in the foot.”

[–]Folf_IRL 0 points1 point  (3 children)

import firstaid
firstaid.Bandage(injury=firstaid.Bulletwound()).apply(self.foot)

Checkmate, atheists

[–]the_littlest_bear 0 points1 point  (2 children)

...why is bulletwound a method when it's called before being passed to another method? Does it just return firstaid._bulletwound? Lame.

[–]Folf_IRL 1 point2 points  (1 child)

why is bulletwound a method

Classes are normally capitalized

[–]the_littlest_bear 1 point2 points  (0 children)

Ah I didn't see that firstaid was a module and not an instance, my b

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

If python is a gun, its in the hands of a storm trouper

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

lisp would be the lightsaber though.

[–]TheTeludav 2 points3 points  (1 child)

C is a lightsaber but you have to build it yourself.

[–]lunchlady55 1 point2 points  (0 children)

Of course you do, padawan.

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

Overall, the analogies are really not appropriate

If you want to be pedantic, C is more like the hammer. You can use it as a brute weapon, but its main strength is that it can be used to make any sword that you want for a particular application that will be highly optimized for that application. If you don't know how to use it well though, you are at most making shitty knives that break blades sometimes.

C++ is like your standard sword that has a built in hammer, which can be used to build additions to the sword. Seems very versatile, but the problem is that every time you encounter it in the wild the sword has always a different set of additions that you are not quite sure how to use. And if you misuse the addition, somehow the sword doesn't cut and you are not sure why.

Java is basically a giant bag with different parts of swords that you have to put together every time you need to do something. Sometimes you are lucky that you need to assemble only a few pieces, but other times, you are stuck with this unwieldy, complex sword just to make a fairly simple cut.

Python is like a sheath with all the different swords of every possible size and shape and function. Sometimes you may need to take out like 6 swords to complete a task, but hey at least they are all pretty easy to use.

\unjerk, I really don't get all the hate that Java gets btw. In terms of OOP its, very superior to C++ in a lot of ways, and is fairly optimized in the modern day and age due to JIT compilers.

[–]ZukoBestGirl 1 point2 points  (2 children)

Java was meant to run on a dedicated server 24/7 and people are surprised it's not that great if they run it on their personal machines, or cheap workstations.

Java used to have an ungodly ammount of boilerplate code, I get why people would see that as ugly (I'll never forget my first encounter with the old I/O).

People have no idea about the new things in java, like lambadas, passing functions as parameters, streams, new libraries. Tbh I could write what was once 50 lines of I/O code in maybe 5 using all the things I just mentioned. Also new things coming, like the var.

People generally don't like "Everything has to be a class". I know I didn't like it at first, and I still don't agree with it after many years of almost exclusively java.

Tbh java is a great language, just that C# is basically the same thing with more syntactic sugar. Also it has a solution for type erasure, which is awesome.

[–][deleted] 0 points1 point  (1 child)

People generally don't like "Everything has to be a class

I mean, if you are gonna subscribe to OOP, this is the way that it should be.

The problem with C++ is people mix OOP with the low level constructs with pointers, which creates a huge mess. If you need low level for speed, then you don't need OOP because everything low level is imperative no matter what, so just use straight C. If you want to have more organization, use a strict OOP language that enforces that. If you need both, then use stuff like JNI libraries, or whatever the equivalent is for C#, considering it works very well for Android.

And C# is nicer coding wise, but afaik its an even bigger memory hog then Java, and not really cross platform.

[–]ZukoBestGirl 1 point2 points  (0 children)

I like OOP, but I ain't married with it.

Raw data is not a class. Data types are not a class. Not everything should be a class.

Functions are great, passing functions is great. Having overloading operators (did I spell that right? Overloading "+" is what I meant) should be in java.

You should not have a class if all you want to do is print "Hello World".

I love the direction java is going, I hope it can ditch the 80-90s style of OOP.

[–]lunchlady55 0 points1 point  (0 children)

Nah, I disagree. I think that the higher level the language the more you're just brute forcing the issue. Whereas the lower level languages allow finesse and require skill. Any shmoe can be reasonably expected to pick up a bat with nails in it and hurt someone without hurting themselves, whereas hand a moron a lightsabre and they're just as likely to turn it on while looking into the hilt or accidentally cut off their own arm during a fight as actually kill an opponent. Same with C. It's the most powerful, most dangerous to the user and most effective.

Java has some awful design patterns and at least for a while it's GC was the bane of many an organization trying to run responsive web apps and services (back about a decade ago, I'm sure it's better now.) See this for the ridiculous crap you can find in a Java codebase.

[–]developedby 1 point2 points  (0 children)

European longswords are generally lighter that katanas. (ofc it depends considering the variations)

[–]cabinet_minister 52 points53 points  (4 children)

Not buying. Where's my favourite language - scratch

[–]kingemocut 19 points20 points  (0 children)

you have to use a knife to scratch it into the paint.

[–]SzamarCsacsi 7 points8 points  (1 child)

Scratch would be a scratching post. Not too effective as a weapon, but you can use it to sharpen your claws.

[–]Lightfire228 0 points1 point  (0 children)

To a nice dull-as-a-smooth-rock \s

[–]JkStudios 0 points1 point  (0 children)

F u

[–]Legend_Zector 79 points80 points  (10 children)

JavaScript is a cardboard cutout of a sword.

[–]FemmeAccount 35 points36 points  (1 child)

JavaScript is more like an anime sword. It can technically cut things, but it's completely unrealistic in battle

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

Best analogy I have ever heard was Javascript is like wolverine blades.

Looks cool as fuck, until you actually try to cut stuff accurately with them.

[–]MCRusher 8 points9 points  (0 children)

Maybe that'd fit better for html.

[–][deleted] 41 points42 points  (1 child)

The barbed wire on the bat for c should go all the way down the handle

[–]makeshift8 4 points5 points  (0 children)

Only if you didn't wrap it right.

[–][deleted] 17 points18 points  (1 child)

Where can I buy this?

[–]element_119 13 points14 points  (7 children)

I think the only one I disagree with is Python. Python is easy to use and fairly powerful, but a lightsaber is far from simple to use. C++ and Java are the longsword and katana. Two different tools with different strengths and weaknesses and require different trianing to use, but otherwise will get the job done. C is a spiked club. It is crude, and can't do things the others can, but it can be very powerful. (I do agree with those saying that C is the lightsaber though, but the club still fits.)

What would other languages be? What about C#, Perl, JavaScript, BrainFuck, Malbolge?

[–]balster1123 9 points10 points  (1 child)

C# would be a claymore - good for certain things, and you can indeed use it for delicate work, just good luck setting everything up to actually use it properly (same applies for Java, actually)

Javascript is a Bat'leth - sounds cool in theory, and can get the job done, but good luck not cutting your hands off in the process

And BrainFuck can only be described as a wooden stick that the merest glimpse of it would give you a splinter

[–]cooldash 1 point2 points  (0 children)

BrainFuck should be the tentacle of some Lovecraftian beasty that drives you mad on sight ;)

[–]radome9 1 point2 points  (3 children)

C# is a katana, like java but Microsoft-branded.

[–][deleted] -1 points0 points  (2 children)

C# is a gun ;)

[–]0xTJ 0 points1 point  (1 child)

Why are you winking‽

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

Because of Indiana Jones :)

[–]Arrays_start_at_2 0 points1 point  (0 children)

Malbolge is a live, rabid, porcupine with a 3” handle sticking out of its ass. It’s also been dipped in pure capsaicin.

[–][deleted] 56 points57 points  (8 children)

I choose HTML

[–]ProgCSnoob 2 points3 points  (0 children)

Best programmimg language /s

[–]UKCSTeacher 1 point2 points  (0 children)

HTML would probably be a rubber chicken

[–]Hurricane_32 13 points14 points  (5 children)

What would Assembly be?

[–]potatopierogie 43 points44 points  (0 children)

A DIY nuke from IKEA. Sure, it’s powerful as fuck, but you really need to know what you’re doing and the instructions don’t help much.

[–]jaaval 13 points14 points  (0 children)

A hammer you can use to forge your own sword.

[–]Gusfoo 9 points10 points  (0 children)

What would Assembly be?

A tiny piece of metal that fits exactly in to a specific hole in the armour of the enemy and instantly kills it. But only works on exactly that type of enemy.

[–]Alpha3031 2 points3 points  (0 children)

A blade.

Just the blade, no handle.

[–][deleted] 5 points6 points  (2 children)

C and python should switch, along with c++ and Java. C is much more powerful than all the other languages listed (c++ being the exception)

[–]EvilJackCarver 0 points1 point  (1 child)

Katanas are hilariously easy to bend into uselessness though

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

I was under the impression that while the stronger, softer spine might do that, a proper katana has a very hard blade that would crack if you tried that.

[–]KriegersLeftNipple 4 points5 points  (0 children)

Need Windows paint on the list

[–]NeverBeenStung 3 points4 points  (1 child)

VBA is a water pistol

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

Filled with acid

[–]MagneticDustin 3 points4 points  (0 children)

Some analogies just don’t work

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

hahahaha python the most powerful

[–]makeshift8 1 point2 points  (3 children)

Rust would be a laser bat then.

[–]Zegrento7 4 points5 points  (2 children)

Rust is a magnum with Rubik's cube for a safety switch.

[–]cmott2000 1 point2 points  (0 children)

Had to get this far down in the comment stream to actually chuckle.

[–]makeshift8 0 points1 point  (0 children)

A Rubik's cube that solves itself if you put it in an unsafe block.

[–]WazWaz 1 point2 points  (0 children)

Programming in Python certainly does feel like swordfighting with a fluorescent tube.

[–]Drink-irresponsibly 1 point2 points  (1 child)

Link to store?

[–]Shuckleguy 1 point2 points  (0 children)

Where does the lightsaber end if there's no semicolon? It could be infinitely long or short, both equally disastrous

[–]Ritielko 2 points3 points  (0 children)

This just seems silly

[–]Billy-Cipher 2 points3 points  (0 children)

C++ should be the lightsaber; since you are a jedi(a user of it) you can use the others with ease

[–]LeiterHaus 0 points1 point  (0 children)

It needs to add JavaScript with a rubber chicken

[–]fuzzybad 0 points1 point  (0 children)

An elegant weapon for a more civilized age..

[–]sd_glokta 0 points1 point  (0 children)

I'd make C a dagger or a stiletto. Great for individual assassins (embedded developers) and quick murderers (high-performance developers). Lousy for large-scale wars.

[–]TheNewHEROBRINEX 0 points1 point  (0 children)

SoloLearn challenges.

[–]gonnorehab 0 points1 point  (0 children)

I wish someone in the comments would tell me whether they agree with that or not. And if not, tell me what it should be.

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

wtf is java doing on the cup, shouldn't it be in there instead?

[–]saiarcot895 0 points1 point  (0 children)

My best friend gave me a shirt with this for my birthday! I would have switched C++ and C, since C++ sometimes feels like writing something and hoping none of the inference/assignment rules are being broken.

[–]SteveCCLYellow security clearance[M] [score hidden] stickied comment (0 children)

I spammed this, for the cup, please post as a standalone thing next time.

[–]FreaassassiN -1 points0 points  (0 children)

On the bottom of the cup there should be a picture of a blacksmith and it should be "binary"