Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Flow typing is where the type of a variable changes based on control flow.

Consider:

    x : Int32 | String
    if x.is_a? Int32
      # typeof(x) == Int32
    else
      # typeof(x) == String
    end


Thanks!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: