Skip to content

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Jan 12, 2017

Also expand factorial example.

ctod.dd Outdated
$(H4 The C Way)

It's annoying to have to put the struct keyword every time a type is specified,
It's annoying to have to put the `struct` keyword every time a type is specified,
Copy link
Contributor

Choose a reason for hiding this comment

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

Also replace "put" with "use" or "write".

ctod.dd Outdated
$(H4 The D Way)

The length of an array is accessible through the property "length".
The length of an array is accessible through the property `length`.
Copy link
Contributor

Choose a reason for hiding this comment

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

"length property"

{
typedef int fp(int);
alias int fp(int);

Copy link
Contributor

Choose a reason for hiding this comment

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

new alias syntax please

Copy link
Contributor Author

@ntrel ntrel Jan 13, 2017

Choose a reason for hiding this comment

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

Not sure how, I tried alias fp = int function(int) but that didn't work.

edit: It fails is(fp == function).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I've run into this issue before. If it is what I think it is, it's not possible to translate this to the new alias syntax.

@ntrel
Copy link
Contributor Author

ntrel commented Jan 13, 2017

@Hackerpilot done

@schuetzm schuetzm merged commit 82f057b into dlang:master Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants