On 13 March 2013 17:17, Igor Polyakov <
iop...@gmail.com> wrote:
> Ruby 2.0 doesn't enforce order:
>
http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail/
>
> As a native Slavic language speaker this is more natural to me as Slavic
> languages don't encode any information in word order. I still can't remember
> whether it's at:put: or put:at: (from lack of practice, obviously)
> in PHP it's an order of magnitude worse: the needle and the haystack are in
> random order, depending on which function you call
Neither Newspeak nor Smalltalk use keyword arguments. In Ruby these
are not arguments, they are dictionary keys. To be precise: in
method at: 1 put: 2
we have a method called :method taking a single dictionary as
parameter, in which are two keys :at and :put. It's identical to
method(:at => 1, :put => 2)
I don't know how much experience you have in working with these kinds
of methods. I have, and I hate it. You look at the method definition
and you have NO IDEA what parameters the method should take. You have
to manually scan the method looking for dictionary access - which can
occur in multiple ways (opt[:foo] or opt.fetch(:foo)) - and hope that
you haven't missed something, or someone hasn't done something extra
clever with the dictionary like merge it with other dictionaries.
It's a terrible way to program.
frank
> --
> You received this message because you are subscribed to the Google Groups
> "Newspeak Programming Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
newspeaklangua...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>