Seems pointless to change it from other languages unless there’s a reason I don’t know about.
One thing to keep in mind is that a lot of Crystal was inspired by Ruby, and for us Ruby developers
=> is what was used for hashes. Though, Ruby does allow for using
: now, it didn’t always. Plus, PHP also uses the rocket syntax in the assoc arrays
["key" => "value"]. And perl uses this syntax
%data = ('John Paul' => 45);. I’m sure there’s some other languages out there that use this syntax as well, but I’d say since Ruby took inspiration from Perl, and Crystal took inspiration from Ruby, we get
=> with our hashes. The same goes for the Proc literal syntax.
Now, granted, Crystal isn’t trying to mimic Ruby 1 to 1, but you have to also keep in mind that Crystal has been in development for over 5 years now (7 maybe?), so this could have been an easy thing to change years ago, but for now since it’s getting closer to 1.0, I see it sticking around for the long run. (I personally love the syntax )