J
J
judywb2020-11-15 21:07:43
go
judywb, 2020-11-15 21:07:43

How can the go language be compiled?

I'm relatively new to programming, but how can go be compilable? It's actually a python. Dynamic typing, etc. As far as I know, compiled ones, those that communicate closely with the computer and are immediately translated into bytes, but how can go be translated? If it can, then why can't python or java?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
d-sem, 2020-11-15
@judywb

Go is compilable because it compiles

T
ttlscr, 2020-11-19
@ttlscr

Uncle sho you sculpt. It seems to you that there is dynamic typing, but you try to do it like this:

x := 1
x = "Test"

Does not work? A python can
x = 1
x = "Test"

The fact is that the Go compiler, before actually compiling it, goes through your code and when it sees it actually replaces it with and only then compiles it. As you might have guessed, this "dynamic typing" only works at compile time. All pis I don’t know where you saw the resemblance to a python ... x := 1var x int = 1

S
Saboteur, 2020-11-15
@saboteur_kiev

judywb ,

as I know, compiled ones are much better than non-compiled ones, and why would the creator of the language worsen their language, or are they just too lazy

You know?
And justify your point of view, why are they better?
IMHO you have a very poor understanding of the meaning of different languages, and even more poorly know how they actually work

V
Vasily Bannikov, 2020-12-30
@vabka

It's actually a python.

Not
Dynamic typing, etc.

Static typing.
As far as I know, compiled ones, those that communicate closely with the computer and are immediately translated into bytes, but how can go be translated?

Compiler
If it can, then why can't python or java?

Python can't because it's interpreted. java can - see graalvm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question