mfichman / jogo

High(er) performance compiled programming language with clean, powerful syntax
MIT License
6 stars 1 forks source link

Allow key: syntax in hash literals #52

Open mfichman opened 11 years ago

mfichman commented 11 years ago

For example:

hash = {one: 'two', three: 'four'}
hash = Hash[String, String]()
hash['one'] = 'five'

Note that this makes it ambiguous whether one: is a key if 'one' is a variable in scope.

mfichman commented 11 years ago

Perhaps use Lua syntax:

hash = {one='two', three='four'}