1- # Deprecated Features {#deprecated-features.appendix}
1+ # Deprecated Features
22
33This appendix lists currently deprecated functionality along with how
4- to replace it. These deprecated features are likely to be removed in
5- the next major release.
4+ to replace it.
5+
6+ Starting with Stan 2.29, minor (syntax-level) deprecations can be removed 3
7+ versions after release; e.g., syntax deprecated in Stan 2.20 will be removed in
8+ Stan 2.23 and placed in [ Removed Features] . The Stan compiler can
9+ [ automatically update] ( https://mc-stan.org/docs/stan-users-guide/stanc-pretty-printing.html )
10+ many of these on the behalf of the user.
11+
12+ Any feature which changes semantic meaning (such as the upgraded ODE solver
13+ interface) will not be removed until a major version change (e.g. Stan 3.0).
614
715
816## Assignment with ` <- `
@@ -21,6 +29,7 @@ a <- b;
2129a = b;
2230```
2331
32+ * Scheduled Removal* : Stan 2.32
2433
2534## ` increment_log_prob ` statement
2635
@@ -42,15 +51,18 @@ underlying log density is incremented with each element.
4251target += u;
4352```
4453
54+ * Scheduled Removal* : Stan 2.32
4555
4656## ` get_lp() ` function
4757
4858
49- * Deprecated* : The no-argument function ` get_lp() ` is deprecated.
59+ * Deprecated* : The built-in no-argument function ` get_lp() ` is deprecated.
5060
5161* Replacement* : Use the no-argument function ` target() ` instead.
5262
5363
64+ * Scheduled Removal* : Stan 2.32
65+
5466## ` _log ` density and mass functions
5567
5668
@@ -83,10 +95,10 @@ with the log probability mass function
8395foo_lpmf(y | ...).
8496```
8597
98+ * Scheduled Removal* : Stan 2.32
8699
87100## ` cdf_log ` and ` ccdf_log ` cumulative distribution functions
88101
89-
90102* Deprecated* : The log cumulative distribution and complementary
91103cumulative distribution functions for a distribution ` foo ` are
92104currently written as ` foo_cdf_log ` and ` foo_ccdf_log ` .
@@ -95,15 +107,6 @@ currently written as `foo_cdf_log` and `foo_ccdf_log`.
95107Replace ` foo_ccdf_log(y, ...) ` with ` foo_lccdf(y | ...) ` .
96108
97109
98- ## ` multiply_log ` and ` binomial_coefficient_log ` functions
99-
100- * Deprecated* : Currently two non-conforming functions ending in suffix
101- ` _log ` .
102-
103- * Replacement* : Replace ` multiply_log(...) ` with ` lmultiply(...) ` .
104- Replace ` binomial_coefficient_log(...) ` with ` lchoose(...) ` .
105-
106-
107110## User-defined function with ` _log ` suffix
108111
109112* Deprecated* : A user-defined function ending in ` _log ` can
@@ -123,6 +126,11 @@ target += foo_log(y, ...);
123126functions or ` _lpmf ` for mass functions in the user-defined function.
124127
125128
129+ * Scheduled Removal* : Stan 2.32
130+
131+ Note: Following Stan 2.32, users can stil define a function ending in ` _log ` ,
132+ it will just no longer have a special meaning or support the ` ~ ` syntax.
133+
126134## ` lkj_cov ` distribution
127135
128136* Deprecated* : The distribution ` lkj_cov ` is deprecated.
@@ -155,6 +163,8 @@ block or as a transformed parameter. An even more efficient transform
155163would use Cholesky factors rather than full correlation matrix types.
156164
157165
166+ * Scheduled Removal* : Stan 3.0 or later.
167+
158168## ` if_else ` function
159169
160170* Deprecated* : The function ` if_else ` is deprecated. This function
@@ -176,14 +186,10 @@ with
176186x = a ? b : c;
177187```
178188
179- ## ` abs(real x) ` function
180-
181- * Deprecated* : Use of the ` abs ` function with real-valued arguments
182- is deprecated; use functions ` fabs ` instead.
189+ * Scheduled Removal* : Stan 2.32
183190
184191## Character ` # ` as comment prefix
185192
186-
187193* Deprecated* : The use of ` # ` for line-based comments is
188194 deprecated. From the first occurrence of ` # ` onward, the rest
189195 of the line is ignored. This happens after includes are resolved
@@ -192,6 +198,7 @@ x = a ? b : c;
192198* Replacement* : Use a pair of forward slashes, ` // ` , for line
193199 comments.
194200
201+ * Scheduled Removal* : Stan 2.32
195202
196203## Brackets array syntax
197204
@@ -219,3 +226,30 @@ array[3] vector[7] mu;
219226array[15, 12] matrix[7, 2] mu;
220227array[2, 3, 4] cholesky_factor_cov[5, 6] mu;
221228```
229+
230+ * Scheduled Removal* : Stan 2.32
231+
232+
233+ ## New Keywords
234+
235+ * Deprecated* : The following identifiers will become
236+ [ reserved] ( #reserved-names )
237+ in the language in
238+ the specified version
239+
240+ * Replacement* : Rename any variables or functions with these names.
241+
242+ | Identifier | Version |
243+ | ------------| ---------|
244+ | array | 2.32 |
245+ | lower | 2.32 |
246+ | upper | 2.32 |
247+ | offset | 2.32 |
248+ | multiplier | 2.32 |
249+
250+
251+ ## Deprecated Functions
252+
253+ Several built-in Stan functions have been deprecated. Consult the
254+ [ functions reference] ( https://mc-stan.org/docs/functions-reference/deprecated-functions.html )
255+ for more information.
0 commit comments