Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Smarter" and "stupider" are completely subjective terms.

It translates one language into another, while maintaining logical correctness and its original semantics. Some cases are easier to do than others, but it doesn't change the nature of what is being done: language translation.

It isn't as simple as you think. Ex. in basic, the goto statement allows you to jump from anywhere to anywhere. Go has restrictions, such as it may not jump over variables coming into scope (being declared), nor can it jump into another scope, only outwards. So, for starters, this probably needs to scan the BASIC code for variables and hoist everything to the top as well as rewrite any code where it is trying to jump into a deeper scope (ex. jump from the topmost scope of a function into the body of a for loop).

Yes, it is a compiler. Maintaining semantics.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: