Skip to the posts
Buffalo's neighborhood journals since 2003 🌱 Plant🌶️ Spice🩸 Heme🫐 Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt☀️ Light🐦‍⬛ Crow

jim’s journal

Programming Stuff

· · 🌡️ 84°F

In Ruby 2.0, a new hash literal syntax (like javascript!)

{a: "thing"} # ruby 2.0

{:a => "thing"} # ruby 1.8

array('a' => "thing") # and PHP

Succinct.
23 words

💬 5 comments

  1. tinypliny ·

    Wah wah janaab.
  2. paul ·

    I have no idea why the PHP developers will not do this.

    Status: Wont fix

    :::link:::

    Search this page for New Array Syntax to see how crazy the debate about this got
    :::link:::
  3. jim ·

    The second link is awesome reading!

  4. joshua ·

    Tiny that is funny =)
  5. mrdeadlier ·

    I'm totally stealing his thunder here but ask Paul about the printer extension he found on PHP.net today. :)

💬 Write a comment