4 Matching Annotations
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
Depends on the style guide you follow for your project. The popular Ruby Style Guide says to "Avoid using Perl-style special variables (like $:, $;, etc. ). They are quite cryptic and their use in anything but one-liner scripts is discouraged."
-
When I first got started with Ruby, I obviously thought that $LOAD_PATH was better. But once you've graduated from beginner status, I'd only use $LOAD_PATH if I was trying to make my code more readable to a beginner. Meh its a trade off.
-
The Ruby load path is very commonly seen written as $: , but just because it is short, does not make it better. If you prefer clarity to cleverness, or if brevity for its own sake makes you itchy, you needn't do it just because everyone else is. Say hello to ... $LOAD_PATH ... and say goodbye to ... # I don't quite understand what this is doing... $:
-
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
Don't sacrifice clarity for brevity when creating a minimal example.
-