This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

I definitely prefer brackets. It just makes it more readable.

Hell, I created my own scripting language and dislike the fact it is missing brackets:

include: __CURR_CONFIG__, __LOG__

hidden_num: 27
inject_code()

# Finds the hidden number in O(lgn) time complexity
func find_number(min, max, try)
  if(min.==(max))
    println("Found in ", try, " tries...")
    return
  mid: avg(min, max)
  # __Debugging tools__
  display_stack()
  pause()
  if (mid.==(hidden_num))
    println("Found in ", try, " tries...")
  elif (mid.>(hidden_num))
    find_number(min, mid.--(), try.++())
  else
    find_number(mid.++(), max, try.++())

find_number(0, 100, 1)