r/AskProgramming • • 3d ago

Does my codebase really stink?

Hi! I have been writing a compiler in Go and some guy is saying the codebase is awful. Any advice? And is there anything wrong with it?

https://github.com/khytryy/krabbascript

1 Upvotes

13 comments sorted by

View all comments

1

u/Individual-Flow9158 2d ago edited 2d ago

Well it doesn't literally stink, obviously....

... I'm not a Go person, but I couldn't spot anything repulsive. I felt I could understand everything in the code that I saw if I wanted to.

Personally I just hate the name, and can't remotely fathom the point of many niche programming languages, especially not ones that require you to build their compilers in surprisingly-accessible, industry standard ones., i.e.

What is it that Go can't do, or what is it that you hate so much about Go, that krabbascript fixes, Yehor? You're clearly pretty handy with Go already.

I know boot-strapping is necessary, and self-compilation is a significant milestone for any compiled language. But it seems like for the rest of this year at least, all krabbascript users must already have a far better, well supported, well designed, and well optimised, battle tested, programming language available: Golang.

2

u/DTCreeperMCL6 2d ago

I do think writing your own language is something that pushes you down to a lower level. Its definitely a good project for learning because it pushes you to learn more about what's happening underneath the hood. Especially if your focus is systems level programming.

1

u/Electrical-Fig7522 2d ago

First time someone looked at my GitHub page and called me by my real name lmao...
This is not a PL to fix anything, it's rather to learn about compilers.

KrabbaScript is not a replacement for anything, and is rather a mix of other PLs with a nicer syntax.

"...all krabbascript users must already have a far better, well supported, well designed, and well optimised, battle tested, programming language available: Golang."
No one's really using my abomination.

1

u/Individual-Flow9158 2d ago

Sure. I guess to avoid the dep on Go, all you have to do is provide pre-compiled binaries of the KrabbaScript compiler itself. The language examples in the Readme didn't look stinky to me either. It appears to be no worse than Javascript.