r/AskProgramming 4h ago

GUI or translation theory

2 Upvotes

I have a serious question. I can pick only one of these two. What will be more beneficial if I want to become a software engineer. I already know C++ and I’m learning python rn and will start ML in December. But I have to chose today what I want from these two. The translation theory is about compilers and how they work.


r/AskProgramming 5h ago

Architecture Can I build a programming language that “learns” assembly implementations? (Idea)

0 Upvotes

Is this dumb idea??

I had this random idea for a programming language and I'm wondering if something like this is actually possible.

Basically, the idea is that I could teach the compiler how to implement things in assembly.

For example, I could write something like:

teach get(x):

asm:

; assembly code for getting input

The compiler remembers that. Then later I can just write:

get(age)

and it knows to use the assembly code I taught it earlier.

So instead of the compiler already knowing what every function does, I'm basically teaching it new things by giving it the assembly implementation once.

The goal would be a really simple language to write, but where the compiler generates native assembly/machine code.

Is this actually possible? And would it be worth building as a project?

I don't know low-level programming or compiler stuff that well, so consider me a complete noob and feel free to correct me if I'm misunderstanding something.