Skip to content

Conversation

@schlupa
Copy link
Contributor

@schlupa schlupa commented Feb 4, 2017

Small changes in the "Programming in D for C Programmers" page.

ctod.dd Outdated
$(P C doesn't directly support assert, but does support __FILE__
and __LINE__ from which an assert macro can be built. In fact,
there appears to be practically no other use for __FILE__ and __LINE__.)
$(P C doesn't directly support assert in the language, but does define a
Copy link

Choose a reason for hiding this comment

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

this paragraph is not closed properly

@schlupa schlupa force-pushed the patch-1 branch 2 times, most recently from 1a29aa1 to d64fbba Compare February 15, 2017 20:34
Copy link
Member

@DmitryOlshansky DmitryOlshansky left a comment

Choose a reason for hiding this comment

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

LGTM

… & C11).

The C examples used in that file are not purely C and contain several C++ ism.
Furthermore, they do not use C99 idioms that are now very common. Some of the
examples also contain errors.
 - typecasts of allocation functions are typical of C++ code but are errors in
   pure C.
 - names with leading underscore are reserved for the implementation and shall
   not be used.
 - One example freed an unitialized pointer -> crash guaranteed.
 - Where appropriate, modified or extended the C examples with constructs from
   C99 and C11. Mainly designated initializers.
Confusing formulation amended.
@schuetzm schuetzm merged commit 1897281 into dlang:master Mar 2, 2017
@schlupa schlupa deleted the patch-1 branch March 2, 2017 17:50
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.

5 participants