Hacker News new | past | comments | ask | show | jobs | submit login

Actually went ahead and wrote an RFC for this: https://github.com/Roblox/luau/pull/109



>> Further, while >= and > can both be reversed to <= and < (and thus adding them in this RFC might be considered excessive or unnecessary)

False. You need all operators because for database NULL-alike logic you cannot infer results from one half of operators.

    NULL < NULL == false
    NULL > NULL == false


I agree entirely, you should comment on the RFC for this usecase (binding to database objects). It would be super helpful. :)


Can’t you rewrite the second of those so it becomes the first, hence rewriting `>` into `<`?



You still don’t need `>` for any of those examples though, do you? For example, `NULL > 1` could be rewritten as `1 < NULL` (even though it can’t be rewritten as `not(NULL <= 1)`.


What do you mean by rewritten? In

    func_a() > func_b() 
I expect left-to-right execution order. Not that it should matter in a good code, but anyway.




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

Search: