Current location - Loan Platform Complete Network - Big data management - Hundreds of Programmers: How many programming languages are there?
Hundreds of Programmers: How many programming languages are there?

There are many different kinds of this one, so here's an explanation of the ones you often encounter when writing. Compare a programming language to a car:

Ada is a tank that's ugly as hell but never breaks down.

C is a race car that goes faster than you can imagine, but breaks down every 50 miles.

The Cobol was billed as a car, but no self-respecting driver would admit to having driven one.

The C# is a competition model family wagon. Once you've driven it, you'll never use another competing manufacturer's product again.

C++ is a high-horsepower version of the C-racer, with a ton of extra features and the ability to break down only every 250 miles, but when it does, no one can find out what's wrong.

Eiffel is a car with built-in French-accented driving instructions. He'll help you quickly find mistakes and learn from them, but if you argue with him, he'll yell at you and throw you out of the car. [From Daniel Prager, slightly modified]

Erlang is a fleet of cars that work together to get you wherever you want to go. It takes some practice to maneuver one car per foot, but once you learn how, you can drive them to places that would be difficult to reach otherwise. Also, you're using so many cars, so there's nothing to worry about if a few break down.

Forth ? It's a car you put together by hand from a kit. There's no need for you to have a car that looks or functions the same as anyone else's. However, Forth models can only go backwards.

[Comment on Digg.com, from 256byteram (I couldn't resist adding it):]

FORTH LOVE IF HONK THEN ! (Translation: sorry I really don't know what that means ......)

Fortran is a very primitive car. It could go very fast, provided you always drove on perfectly straight roads. Learning to drive a Fortran-type car is said to cause you to never learn to drive another type of car again.

Java

Java is a family wagon. It's easy to drive, and you can't drive it too fast without hurting yourself.

Version 1: The Haskell?is an extremely elegant and beautifully designed car that is rumored to be able to drive into very extreme terrain. When you try to drive it, it isn't really following the road; in fact, it's constantly replicating itself and the road, and each time it succeeds in doing so, the car goes a little farther down the road than it did the last time. It should still be possible to drive it in the traditional way, but your math skills aren't good enough to figure that out.

Version 2: Haskell isn't a real car, it's an abstract machine that can tell you in detail what the process of driving it should look like, if you want it to. You have to put this abstract machine inside another actual machine in order to drive it, don't ask how the actual machine works. There's another way you can build another abstract machine out of multiple abstract machines, and then give it to that actual machine, so you can complete your journey one after the other. [Versions of Monadic]

Version 1: Lisp looks like a car, but with enough modifications it can be turned into a very efficient airplane or a submarine.

Version 2: At first it doesn't look like a car at all, but every now and then you see someone driving around in it. Finally one day you decide to learn more about it, and then you realize that it's actually a car that can build more cars. You tell your friends about this discovery, but they all laugh out loud and say that these cars look too strange. To this day you still keep one in your garage and look forward to taking it on the road someday. [From Paul Tanimoto]

Mathematica?is a well-designed car that borrows a great deal from Lisp-type automobiles without giving it even a modicum of well-deserved praise. It can calculate the most efficient path to a destination from equations, except that it costs a fortune.

It's a short trip car designed for novices, usually to places where Mathmatica-type cars go. It's a very comfortable car to drive in those places, but as soon as you stray even a little bit from the route, it becomes so difficult to drive that many snobby drivers won't recognize it as a car at all.

The Ocaml is a very sexy European car. It's not as fast as the C, but it never breaks down, so as a result you'll spend less time getting to your destination instead. But since this is France, all the controls are not where they should normally be.

Perl is supposed to be a pretty cool car, but the driver's manual is hard to understand. Also, even if you could find a way to drive a Perl model car, you wouldn't be able to drive someone else's Perl model car.

PHP is the Oscar Mayer Wienermobile, which is very quirky and hard to drive, but everyone wants to drive it anyway. [CosmicJustice from digg.com]

Version 1: Prolog is fully automated: you tell it what your destination looks like, and it does all the rest of the driving. [Paul Graham's addition:] In most cases, though, confirming your destination takes about as much work as if you'd just driven there.

Version 2: Prolog This car has a unique trial-and-error GPS system. On the way to its destination, it would keep going, and if it came to a dead end, it would turn around and try another road, and so on and so forth, until it reached its destination. [I forget who suggested this one]

Python is a great car for beginners, even without a license. Unless you want to go super fast, or want to drive to very dangerous places, you'll probably never use another car.

The Ruby car came about because of a three-car crash involving Perl, Python, and Smalltalk. A Japanese mechanic found pieces of those cars and put them together into a car that many drivers think is better than all three of those cars put together. Some drivers, however, would complain that the Ruby cars had duplicate, or even triplicate, controllers, and that these duplicate controllers were slightly different in some particular cases, which would make the car even more of a pain to drive. Rumor has it that a redesign is already in the works.

The Smalltalk is a small car, originally designed for people who were going to learn to drive, but because it's so well-designed, even experienced drivers love driving it. It's not terribly fast, but you can take any of its parts and modify them to make it more in line with your expectations. The quirky thing is that you don't actually drive it, you just send it a message to go somewhere and then it either drives past or tells you it doesn't understand what you're talking about.

Version 1: A compilation is just an engine. You have to build the car yourself, and you have to manually refuel it while it's running. But if you're careful enough, it can fly like a bat out of hell.

Version 2: Compilation: you yourself are the car.

If a programming language were a weapon:

C is the M1 Garand rifle, old but reliable.

C++ is the nunchuck, tough and attractive to wield, but it takes you years of honing to master, and many people want to switch to another weapon.

Java is the M240 general-purpose magazine-fed automatic machine gun, sometimes it has a round magazine, but sometimes it doesn't, and if it doesn't, when you fire it, you run into a NullPointerException problem, and the gun explodes, and you get blown up.

Scala is a variant of the M240 general-purpose machine gun, but its manual is written in an unintelligible dialect that many suspect is just some dream language.

JavaScript is a sword, but without a hilt.

Go is a homemade "if err ! = nil" starting gun, and after each shot you have to check that it actually fired.

The Rust language is a 3D printed gun. It might actually come in handy in the future.

Bash is a hammer so obtrusive that when you swing it, everything looks like a nail, especially your fingers.

Ruby is a ruby-encrusted sword that people use because it looks cool.

PHP is the water hose, and you usually hook one section of it up to your car's exhaust pipe, stick the other end in the window, and then you get in the car and start the engine.

Mathematica is a sort of Earth low-orbit particle cannon that might be able to do amazing things, but only people who can afford to pay for it can use it.

C# is a kind of powerful laser cannon mounted on a donkey, and it can't seem to fire a laser if it's removed from the donkey.

The Prolog language is an AI weapon that will do what you tell it to do, but afterward, it will get a few terminators out and burn your house down.

The Lisp language is a razor, and comes in many styles. Only thrill-seekers and danger-seekers use it.

I hope this helps, thanks!