Dots and Slashes: The Hyphen and Colon Disruption

I'd gotten the idea in my head from looking at code that dots were superior to slashes for field selection.

I do think it looks less noisy in basic cases:

if system.options.quiet [print "Be quiet!"]

if system/options/quiet [print "Be quiet!"]

But when you combine it with colons, it's a little less obvious:

system.options.quiet: true

system/options/quiet: true

The dot doesn't contrast as well with the colon as the slash does. It's a little close to system.options.quiet.

Another issue is how the dot doesn't stand out quite as much from dash as a slash does:

system.console.print-info "Scans kind of like (system.console.print)-info"

system/console/print-info "More obvious scan as system/console/(print-info) ?"

But it probably as a lot to do with "what you're used to". We certainly are able to group together hyphenated clauses in filenames all the time, like some-file.txt so I am probably just being a bit jarred by seeing a new pattern. Looking at it side-by-side here, I guess you could probably just as easily see the -info as being broken off from the slashes if you wanted to see it that way...

Overall, I feel like the benefit of distinguishing function refinements from field selection is high enough to warrant shifting to dots. But I just was a bit surprised that I didn't instantaneously think it was 100% better-looking. :-/

1 Like