Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boyscout: clean up ootr example #102

Merged
merged 1 commit into from
Feb 22, 2015

Conversation

kikofernandez
Copy link
Contributor

clean up ootr example for the Brussels demo:

  • do not return (), if something returns void it doesn't matter
    what is the last expression, it knows it has to return void
  • remove re-definition of i to i + 1, we can do this inside
    the while loop
  • remove N = i + 503

clean up ootr example for the Brussels demo:

- do not return (), if something is void it doesn't matter
  what is the last expression, it knows it has to return void

- remove re-definition of i to i + 1, we can do this inside
  the while loop

- remove N = i + 503
cur = first
in {
while (i < N) {
i = i + 1;
next = new Agent(i);
cur.setNext(next);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albertnetymk is there any reason why we want to use . instead of !?

@kaeluka
Copy link
Contributor

kaeluka commented Feb 22, 2015

If I'm not mistaken, there's no reason to ever use . when you're not going to use the future, right?

If the above sentence is correct, we could actually emit a compiler warning or even automatically translate the dot to a bang.

@supercooldave
Copy link

The final version of method calls should probably not use "!". One can infer (easily) whether the resulting future is required.

@albertnetymk
Copy link
Contributor

. feels more like OO. ! feels like boolean operator.

@albertnetymk albertnetymk reopened this Feb 22, 2015
albertnetymk added a commit that referenced this pull request Feb 22, 2015
boyscout: clean up ootr example
@albertnetymk albertnetymk merged commit 8ed0150 into parapluu:new-ponyrt Feb 22, 2015
@kikofernandez kikofernandez deleted the bugfix/ootr branch February 22, 2015 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants