Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1748)

Delta Between Two Patch Sets: Documentation/contributor/programming-work.itexi

Issue 5364048: Adds some info about pure properties to the CG. (Closed)
Left Patch Set: Incorporates suggestions from Keith and Joe. Created 12 years, 4 months ago
Right Patch Set: Adds @end itemize Created 12 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 @c -*- coding: utf-8; mode: texinfo; -*- 1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @node Programming work 2 @node Programming work
3 @chapter Programming work 3 @chapter Programming work
4 4
5 @menu 5 @menu
6 * Overview of LilyPond architecture:: 6 * Overview of LilyPond architecture::
7 * LilyPond programming languages:: 7 * LilyPond programming languages::
8 * Programming without compiling:: 8 * Programming without compiling::
9 * Finding functions:: 9 * Finding functions::
10 * Code style:: 10 * Code style::
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 1799
1800 1800
1801 @node Purity in LilyPond 1801 @node Purity in LilyPond
1802 @subsection Purity in LilyPond 1802 @subsection Purity in LilyPond
1803 Pure properties in LilyPond that do not have any @q{side effects}. 1803 Pure properties in LilyPond that do not have any @q{side effects}.
1804 That is, looking up a pure property should never result in calls to the 1804 That is, looking up a pure property should never result in calls to the
1805 following functions: 1805 following functions:
1806 @itemize 1806 @itemize
1807 @item @code{set_property} 1807 @item @code{set_property}
1808 @item @code{set_object} 1808 @item @code{set_object}
1809 @item @code{suicide} 1809 @item @code{suicide}
pkx166h 2011/11/21 17:31:07 Mike you need an @end itemize Here else it does
1810 @end itemize
1810 This means that, if the property is calculated via a callback, this callback 1811 This means that, if the property is calculated via a callback, this callback
1811 must not only avoid the functions above but make sure that any functions 1812 must not only avoid the functions above but make sure that any functions
1812 it calls also avoid the functions above. Also, to date in LilyPond, a pure 1813 it calls also avoid the functions above. Also, to date in LilyPond, a pure
1813 function will always return the same value before line breaking (or, more 1814 function will always return the same value before line breaking (or, more
1814 precisely, before any version of @code{break_into_pieces} is called). This 1815 precisely, before any version of @code{break_into_pieces} is called). This
1815 convention makes it possible to cache pure functions and be more flexible 1816 convention makes it possible to cache pure functions and be more flexible
1816 about the order in which functions are called. For example; Stem #'length has 1817 about the order in which functions are called. For example; Stem #'length has
1817 a pure property that will @emph{never} trigger one of the functions listed 1818 a pure property that will @emph{never} trigger one of the functions listed
1818 above and will @emph{always} return the same value before line breaking, 1819 above and will @emph{always} return the same value before line breaking,
1819 independent of where it is called. Sometimes, this will be the actual length 1820 independent of where it is called. Sometimes, this will be the actual length
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 #(display conditionalMark) 2646 #(display conditionalMark)
2646 @end example 2647 @end example
2647 2648
2648 noindent 2649 noindent
2649 inside the @file{.ly} file. 2650 inside the @file{.ly} file.
2650 2651
2651 The breakpoint failing may have to do with the call sequence. See 2652 The breakpoint failing may have to do with the call sequence. See
2652 @file{parser.yy}, run_music_function(). The function is called directly from 2653 @file{parser.yy}, run_music_function(). The function is called directly from
2653 C++, without going through the GUILE evaluator, so I think that is why 2654 C++, without going through the GUILE evaluator, so I think that is why
2654 there is no debugger trap. 2655 there is no debugger trap.
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b