joaomilho / Enterprise

šŸ¦„ The Enterpriseā„¢ programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README.md confusing comments

drewcoo opened this issue Ā· comments

Frist bug!

I'm having trouble with this:
// adds one to counter
counter++

Is that a prefix or postfix addition? I can't tell the order of operations on that line from the comment and it really should tell me.

If you're asking about the ++, remember Enterprise is non deterministic language. You'll find if it adds and returns or returns and adds at runtime, without many guarantees. So our advice is to always do it before you'll use the variable.

In Enterpriseā„¢ Web3.0ā„¢, the implementation is mutate counter++;;;, and that's very sensible, so we may change the specs here.

Now, if you're asking about the comment, just do // the next line adds one to counter, or maybe we should have new comment types, like "next line comment", "this line comment", "previous line comment" and "this comment is for the next nth line[s]".

Interesting. I didn't realize the language was non-deterministic. Are there outdated tests that fail to guarantee this contract? Perhaps I will fork this repository into a private location, add some of those tests, and never give you a pull request because open sores is all about the bizarre and not the catheterall.