Skip to content

Conversation

@mistay
Copy link

@mistay mistay commented Oct 13, 2015

this is armin langhofer's impl of a linked list (assignment 0)

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the advantage of recursion in this case? The recursion parameter (next) is, in fact, an iterator. I'm not saying recursion is wrong here... But what is the advantage of recursion instead of iteration?

Copy link
Author

Choose a reason for hiding this comment

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

it's just a little easier to read and (thus) more "elegant" - but: of course you can iterate through the list.

Copy link
Contributor

Choose a reason for hiding this comment

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

Be careful with metrics like "easier to read". They are highly subjective and therefore hard to compare. The actual reason why recursion is more elegant here is the list itself. A linked list is a recursive data type. Nice solution!

selfie.c Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

usually, the number of concurrent processes is not a constant. consider changing that when it comes to forking

@maigner
Copy link
Contributor

maigner commented Oct 30, 2015

did you do a pull request for assignment02. cannot find any

@mistay
Copy link
Author

mistay commented Oct 30, 2015

not yet, is delayed. i'm sorry.

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.

2 participants