←back to thread

165 points ksec | 3 comments | | HN request time: 0.832s | source
1. jspash ◴[] No.43554557[source]
Just curious why the decision was made to go with PascalCase for the DSL? Is this meant to help React devs feel at home? Seems very un-Rubylike.
replies(1): >>43557252 #
2. joeldrapper ◴[] No.43557252[source]
It’s because that’s how constants are named in Ruby. The method names match the constant names of the component classes.
replies(1): >>43557440 #
3. dragonwriter ◴[] No.43557440[source]
methods aren't constants and the normal ruby idiom if there was a reason for method names to correspond to class/constant names in a different module would be for the method names to be the constant name converted from PascalCass to snake_case, rather than the method names being in the format of constant names.