Files
ubicloud/prog/learn_memory.rb
Enes Cakir 8357856622 Add an identifier to all Prog label methods
While reviewing and reading code, label and helper methods are mixed in
Prog files. It's hard to identify sometimes without in-depth looking.

I propose to define labels with `self.label` class method.
One of clover's predecessor has `work_` prefix, and I think it
was useful.

It has some benefits:
1. It helps to identify label methods easily
2. It helps to keep list of valid labels, `hop` can check target label is
   valid or not
3. It generates `hop_#{label}` methods. Instead of freehand `hop :label`
   calls, we can call `hop_label` method similar to `incr_#{name}`
   semaphore methods.

(2) and (3) have some overlapped benefits. They help to stay in valid
label world in different ways.
2023-08-23 12:09:57 +03:00

909 B