Questions that remained after reading all the Overview on the Odin programming language. #2737
Unanswered
joaocarvalhoopen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Questions that remained after reading all the Overview on the Odin programming language.
1. The way a language does it's error processing in functions is one of the thing it's more important in a language, how are the Odin Error processing patterns? How does it all work in a real aplication with functions calling functions inside oen another and passing returning the errors? How do it compares with something like C, exceptions in C++, Error handling propagation beween methods and functions in Rust, and "defer" in GO?
Those patterns of use cases should be highligthed and linked in a proiminent way to be studied by all. Because it's importante, and is a subject in which C lack a lot of power for Error handling.
I sow this on the documentation:
but not on the patterns of code for propagation of errors between functrion calls and returns or_return in nested function calls. What are the stategies and the advice from the more senior in Odin?
Can you please explain and high light it in the documentation that major point of how it works in Odin?
2. Can a iterator in a "for" loop be used for a custom user struct collection type?
How can this iterator be implemented on a type?
What is the convention?
3. The reverse iterator transversal is kind of awkward :-)
will there be the possibility to suport different uses in iterators?
like #reverse, #increment 3, #get_by_ref, #get_by_value
And how can I compose them?
Is this precedure or function type of iterators supported? Will it work?
or even:
or even map, reduce, join, split and that kind of functionally programming inpaired and on other front automatic parallel split of work in multiple threads:
my_vec_2 := map_func( my_vec, square )
4. I beg you, to support some how, in a switch on a case on strings, cstrings and normal strings. This is a so much useful use os a switch in day to day programming. It's sintatic sugar, but is really nice and simplifies the control flow of many small prototipe programs.
5. From the documentation:
in - set membership (e in A, A contains element e)
not_in - not set membership (e not_in A, A does not contain e)
Question: Why only "bit_set's" and "map" types and not "arrays" and "vectors", all collections should have a contains procedure that could be maped to a "in" operator automatically.
6. I don't understand what is the Maybe Union, where do you use it? In what context? How do you use it? A exemplo is in the Overview but it is not really clear, at least to me.
How does it passes trought functions? Where is the Some() and the None of Rust in this Option type?
7. Why assigning to a struct field inside a element of a map is PROIBITED?????
What's the reson of this limitation? I think that it should work well, right?
In the Maps it is written:
What a wonderful programming language and a really nice simple designed language.
Things are logical and make sense.
Thank you very much,
Best regards,
João Carvalho
Beta Was this translation helpful? Give feedback.
All reactions