Thanks for the suggestions! As the syllabus is still in beta, we’re happy to get feedback. I’ll respond to your suggestions in turn to see if I’ve understood everything correctly.
basics declaration of local variables (Variable scope, mem-allocation, errors, …)
I believe we’ve talked about simple declaration of variables in the Basics concept, but variable scope is likely a good topic for a separate concept, as it has it’s own section in the manual. I’ll add this to an issue on the repo, to see if we can make a concept on it.
I believe talking about memory allocation is, at this point, is not strictly necessary, since (if I’ve understood your point) the exercise does not require explicit knowledge of memory management. This could make up part of another concept however.
basic declaration of arrays, multi dimensional arrays…
I noticed that we’ve not explicitly mentioned how to initialize an empty array in the Vectors concept (e.g. output = []). I believe we can modify the docs to include that information, and I’ll open a PR to do so soon.
That said, we want to be careful not to overload students with things like type declarations at this point, since that is covered in a later concept. So, we don’t expect students to write something like output = Pair{String, Int64}[] at this stage. Also Multidimensional Arrays is a later concept which already exists.
I think that preallocation of vectors (e.g. Vector{Pair}(undef, n)) is also beyond the scope of this exercise.
how to sort
We’ve opened an issue to create a concept on sorting and related functions. So it is already in the works.
can delete be used for both Pairs and Arrays or only for Arrays
delete!() can only be use with collections that use a key (e.g. Dict, Set). There is a similar function for Vectors called deleteat!() which uses the index (these differ because keys in a Dict are unique while entries in a Vector need not be). As we are introducing the method specifically in regards to Dicts, mentioning Vectors would be out of the scope of the exercise.
That said, I can understand your confusion in that we didn’t name the function remove_item() with a !, thus it may be assumed that the inventory should not be mutated, thereby excluding the use of delete!(). This exercise was designed to be “mutation agnostic” (i.e. tests will pass with mutating or non-mutating functions) to keep things “simple”, but I believe it would be best to change the name of the function to remove_item!() to avoid this confusion, so I’ll include that in a future PR.
re engineer “Inventory Management” to reuse the created inventory…
While this structure is followed in many exercises, we may sometimes deviate from that to keep students from becoming overly comfortable with a single exercise format. Here, as an alternative, we could imagine the functions in this exercise as composing a module of independent functions which can then be called to act on inventories, or something to that effect (FYI: Modules is a concept currently under discussion).
I hope I’ve address your concerns here, and I’ll try to get to making the changes I’ve mentioned soon, but please let me know if I’ve missed something or misunderstood something.