Mailinglist Archive: yast-devel (66 mails)

< Previous Next >
Re: [yast-devel] YaST Runlevel in Ruby
On Tue, 18 Jun 2013 12:23:16 +0200
"Duncan Mac-Vicar P." <dmacvicar@xxxxxxx> wrote:

On 18/06/13 11:48, Jiří Suchomel wrote:
V Tue, 18 Jun 2013 11:21:49 +0200
Lukas Ocilka <lukas.ocilka@xxxxxxxx> napsáno:


Great work Lukas...

some comments:

Why the name runlevel? that is a leftover concept from SystemV. Why
not using the systemd nomenclature? (services and targets).

As the code is not translated, the code is a good start point for
discussing guidelines for future code.

for code guidelines I prefer to use suse guidelines that is based on
ruby guideline -
https://github.com/SUSE/style-guides/blob/master/Ruby.md

- Enums are usually implemented with simple symbols instead of string
constants. What will YaST use?

for new code I hope, that ruby conventions and practices can be used.

- Hashes vs Struct or classes (this is not a rule, but it would be
good to have guidelines when one or the others will be used)

Well, I like Structs or classes and I think it should be used. Only
difference is that on border between modules you should pass Hash ( of
course I can add some support to ruby bindings to call something like
to_hash on class or Struct and do it automatic, but deserialization is
much harder ).

- Inconsistent usage of ! for methods: eg: "save" does not have one
(mostly coming from the limitation that data is a hash and the
method is wrapped instead of being in the object itself)

I am not sure if Y2 support exclamation mark, if so, then there is no
reason to not use it. Of course we need to consider for existing
modules backward compatibility.

- Inconsistent usage of single and double quotes

Well, I hope that ruby world have it already solved and I don't see
here big issue. Both is suitable for me and even combination.

- documentation. Standard rdoc? yard?

I prefer yard, especially because I hope we will have online generated
documentation ( not part of ycp killing project, but it will be useful
).

Josef


Cheers


--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >