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

WIP: Document noteworthy unusual Julia features. #11998

Closed
wants to merge 7 commits into from
Closed

WIP: Document noteworthy unusual Julia features. #11998

wants to merge 7 commits into from

Conversation

Ismael-VC
Copy link
Contributor

Ref: #11966

Document unicode identifiers.

[av skip]

Ref: #11966

Document unicode identifiers.

[av skip]
ret
end

But be wary...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add something about the two example cases that you need to be wary about (referencing a global variable thinking it was an operator applied to a local variable), and updating a variable without remembering to update the cached value.

The other example, of / returning a different type than it's arguments, and needing to use div
for integer division, along with the possibility of losing digits, should also be added.

Good that you are doing this! I wish I'd had this a couple of months ago!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@yuyichao yuyichao added the domain:docs This change adds or pertains to documentation label Jul 3, 2015

.. note::

Be wary about referencing a global variable while thinking it was an operator applied to a local variable and updating a
Copy link
Member

Choose a reason for hiding this comment

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

I have no idea what this sentence is trying to say. Could you word it differently? Is this related to unicode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ScottPJones would you mind showing a short example of this pitfall?

Copy link
Contributor

Choose a reason for hiding this comment

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

This "pitfall" is a contrived strawman crafted to make a specific point.

@JeffBezanson
Copy link
Sponsor Member

I find it really problematic to have a section like this in the manual. What counts as "unusual" is highly subjective. Specific items like how / behaves are best documented in the "differences from other languages" sections, where we can have objective descriptions. If we want to call attention to certain characters we allow in identifiers, that can go in the existing section on variable names. I don't see the purpose of hand picking a few things to isolate as "unusual" (e.g. inviting debate on whether a certain feature is unusual enough to merit inclusion in this section...).

@Ismael-VC
Copy link
Contributor Author

@JeffBezanson what I would really want, is more people describing more differences with short examples, so that they can be documented in whatever section they end up being needed. Also I know it's subjective but Julia is indeed unusual in many ways, I don't care about the title, it could be whatever we see fit. All I want is better documentation.

@Ismael-VC
Copy link
Contributor Author

What I mean is that some features are not only noteworthy different to just one specific language, but instead are different to many languages at once, which is why some comparisons don't belong into just one particular language section (and redundancy is ugly), another purpose of this document is to concentrate this kind of stuff, instead of having it spread all over the manual.

@JeffBezanson
Copy link
Sponsor Member

If you know language X, then documenting differences with language X is useful. I don't understand the utility of documenting things that are considered different from nothing in particular. Who is the intended audience?

@Ismael-VC
Copy link
Contributor Author

You are assuming that there must be only a one to one relationship between each Julia feature with each other language. All I want is to avoid redundancy (if a feature is related to more than one language) and centralize this kind of information (ie. the style advices are scattered) , but if you guys think it's useless feel free to close this.

@ihnorton
Copy link
Member

ihnorton commented Oct 8, 2015

The example could probably go in http:https://docs.julialang.org/en/latest/manual/interacting-with-julia/ if you want to split out to a new PR. Thanks!

@ihnorton ihnorton closed this Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants