Skip to content

[v3] Implement new Concept Exercise: mutable-composite-types #306

@SaschaMann

Description

@SaschaMann

This issue describes how to implement the mutable-composite-types concept exercise for the Julia track.

Getting started

Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:

Goal

The goal of this exercise is to teach the student mutable-composite-types in Julia. We will teach composite types through Julia's structs.

Things to teach

  • How to define a mutable struct

Things not to teach

  • (Inner/outer) constructors
  • Type parameters

Concepts

  • mutable-composite-types

Prerequisites

  • arithmetics
  • numbers
  • functions
  • methods
  • in-place mutation
  • modules

Resources to refer to

Hints

After

Implementing

This exercise will be second in a row of similarly themed exercises about the type system (see progression.md for the planned progression). The narrative/context should be based on the v2 exercise robot-simulator. (The v2 example solution is rather bad, don't use it as a guide.)

The student should create the following types as part of the exercise:

  • Point with fields x, y
    • in a follow-up exercise this will be expanded to Point{T<:Number}
  • Robot with field position::Point

Further, they need to define methods that move the robot, i.e. change its position.

You may add additional fields and types if necessary, but please try to keep it concise.

For compatibility with the follow-up exercises, a stub module with exports should be provided.

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3 🚀Issues that need to be resolved for the launch of v3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions