3 ms·
That slide was a bit confusing for my underslept mind. Is that meant as an example of calling methods which work over the result of defining main (in this case
by ngcazz 13y ago
That slide was a bit confusing for my underslept mind. Is that meant as an example of calling methods which work over the result of defining main (in this case static and void)?
- lectrick 13y agoIf you say "private def methodname(args); end", the "private" keyword already takes a symbol for a method name to privatize, so in this case the return of "def methodname(args); end" is ":methodname" which then gets passed to "private" and everything magically works.
- hderms 13y agoyeah it's an example of how you could implement higher-level language features much easier if def returns a symbol rather than nil