Skip to content
loading...
Discussion
markdown guide
 

A compiler is like baking a cake. You do all the steps to make the cake, and then finally you bake it into some delicious treat.

An interpreter is like making a salad. You do all the steps and when you've finished them you've made a salad.

 

Being a lover is a kind of interpreted language. Marriage is a kind of compiled language. Behind these, love is an interpreter. If you're a compiler or interpreter, that doesn't matter. In both situations, you have an interpreter.

Other things just an output.

Of course, this is a stupid example. But you feel more flexible with a lover. Your decisions will be interpreted when you need to use them.

While you're married, you can't flexible. Your all decisions will analyze first and then compile.

I don't know, am I crazy? What the heck is that example?

 

If I had any previous knowledge about compilers and interpreters, I would definitely forget every bit of it after that example 😄.

 

Hey there, let's play a game
Here is a paper, You need to open it, there are some lines written on the paper, you have to read one line at a time and act as it says. For example:

Open eyes (open your eyes)
Smile (simple)
Say Hi (say Hi)
Close eyes (close your eyes)

Just one line at a time, one by one, got it? You are an interpreter

Let's play another game, here is a paper, read it and remember all of the acts, then give that paper back to me.
Now act as the paper said
You are now a compiler

Classic DEV Post from Jul 30 '19

PublishTo.Dev: Scheduling article publishing on dev.to

Oğuzhan Olguncu profile image
Language agnostic developer.