What features of Odin do you dislike?

That works for me. The only downside I see with this is for others reading the package. If you see “append” being called somewhere, normally you would assume it’s the builtin one but in this case it’s the package defined one which is slightly less intuitive but honestly it doesn’t make enough of a difference to justify adding a new feature.

I think by “better alternative”, they mean for IDEs like vscode, neovim and helix which rely on an lsp to provide basic functionality like go to definition, symbol rename, and autocomplete.

It’s great if you use sublime text and get those for free but others have to rely on ols to get those features. Not everyone will want to use sublime to write odin so if ols didn’t exist they would probably be using a different language, and there are probably many who don’t use odin because ols is too buggy.

I know language adoption isn’t a primary goal for odin but a good lsp would go a long way.

noob here
So what’s wrong with ‘pattern matching’ that nearly every systems programming language designer seems to have a visceral reaction to it? This is like the third language where I’ve seen the designer react that way.

2 Likes

So “pattern matching” in itself isn’t necessarily bad whatsoever. Odin doesn’t have it because it doesn’t really make sense with the current language semantics.

But one aspect of pattern matching that some might dislike is that it does hide control-flow, or at least not make it obvious.

For it to make sense to have pattern matching in Odin, Odin would have to be a very different language in terms of how it feels.

2 Likes

Everything being public by default. Most things in your projects aren’t required to be public anyways.

1 Like

Well you can put a private what’s it called at top of all files :wink:

I don’t like that I cannot reuse err like in Go.

Or more specifically, the := operator can only be all new variables instead of something like Go that is fine to have one of them being new.

It’s two operators: type and assignment operator respectively.
The := - that is combining the two, leaving out the type - is used for inferred type declarations → Overview | Odin Programming Language

This was done on purpose to a certain extent. := is Go is a mess because it will secretly shadow a lot of the time. Which means I prefer doing var x, y = ... in Go rather than :=. But in some cases you have to use := because of the grammar.

In Odin := isn’t anything like Go’s :=. Odin’s := is actually two operators: : and =.

4 Likes

I dislike that, when I hit odin build or odin run, I get a blank prompt where nothing seems to be going on. Not for long, but - on my machine at least (15 year old ThinkPad) - long enough to ponder the meaning of life and everything . . . :crazy_face:
I am aware that it probably is not feasible with the current LLVM situation, and that the compiler shouldn’t be doing expensive IO, but a few dots printed to standard out once in a while would be nice! :smile:
Addendum:
To continue the Hitchhiker’s Guide theme, it feels a bit like having to wait for Big Thought to come up with the Ultimate Answer . . .

Well, that’s a truly minor issue; the only one I can find with Odin so far!

I know, I just don’t underatand why isn’t it default

1 Like