For example if you properly learn English you can translate to german or French.
Both western languages, countries pretty much next to each other, should be alright.
Now try to translate a language of the Eskimos to a language near the equator, say Mexicans. Eskimos have a huge number of words for 'snow' https://www.princeton.edu/~browning/snow.html A concept alien to Mexicans. Already in English, you'll have major trouble doing the translation, as you simply cannot express every subtlety of the Eskimo snow words.
No matter how hard you try, it won't fit. In addition, any English reader will fail to understand the meaning that an Eskimo intends. The reader simply does not have a matching conceptual frame.
Computer languages are not different. Prolog can only reason about facts and relations, how to put an imperative object-oriented program in there? The concept "assignment" is already alien in it.
I don't see how that counts as "easily transferred".
Similarly, Lua has co-routines, how are you going to "easily transfer" that to assembly language?
I am not saying it can't be done, but I doubt that in general you can make easy transfers. If you can you're lucky, but it's equally possible that the semantic foundation of two languages are so different that it is better to start anew rather than trying to transfer your original idea.
The meaning behind you words never change but the sentence structure and rules changes and yes this is true with programming languages as well.
My point is that in some languages I cannot express the meaning that I had in my original program.
If you are not convinced, please solve the following puzzle.
I wrote a language that has distributed synchronous communication. That means you have two processes, one process sends a message to the other process, and the send and receive happen at the exact same moment in time, atomically. Like a person handing over a note to another person . In the general form, you have a bunch of processes synchronously and atomically exchanging messages between pairs of processes. Interesting problems arise when you have 3 processes, and all try to communicate with the 2 other processes. The result is exchange of 6 messages, in arbitrary order, at one moment in time.
This language is being used, people program their problems in it. Real world problems are being solved in it. I can provide references to published journal articles if you want.
Now, I would really like to have that in C, between computers in a network. How to to transfer that easily? Should be a piece of cake, right?
If you need a grammar of the language, I can supply that too.
The point is you are coding for some meaning 'idea/logic' but the way you tell the computer that meaning differs in structure from language to
language but the meaning never change if it does then you are not understanding exactly my point.
So what about meaning I cannot express in the new language?
I am studying computer science and have just went over
grammar / parsing. CFG is what used to create the rules for the language actually it is the rule for a language.
I would say it is a compiler description of the source language instead. The language itself does not contain its own grammar in explicit form. The C library has not C grammar, only a C compiler has the grammar.
Compilers are very similar no matter what language you use, since at the end of the day, you're translating source text to destination text. Structure of a compiler program has however little to do with the structure and meaning of the concepts of the language they translate.
Ie, structure of the compiler program, and structure (and semantics) of a language are two very different things, and not very related to each other.
This come to any language and every computer language at the end of the day translate to set of rules taken from the instruction set.
After that it is simply do this instruction then this one.
Of course, at the end, it all has to run on the same CPU. However this is similar to "We all make noise with our mouth, therefore all languages that we speak are the same." I don't buy that. I tried understanding French, and failed miserably.