Mercurial > hg > octave-lojdl > gnulib-hg
comparison doc/standards.texi @ 17454:9b8de09b2e2e
autoupdate
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Fri, 19 Jul 2013 15:08:53 -0700 |
parents | 8826dc2ee3ee |
children | 09c1c72dfe80 |
comparison
equal
deleted
inserted
replaced
17453:d6a1c46258ab | 17454:9b8de09b2e2e |
---|---|
1 \input texinfo @c -*-texinfo-*- | 1 \input texinfo @c -*-texinfo-*- |
2 @c %**start of header | 2 @c %**start of header |
3 @setfilename standards.info | 3 @setfilename standards.info |
4 @settitle GNU Coding Standards | 4 @settitle GNU Coding Standards |
5 @c This date is automagically updated when you save this file: | 5 @c This date is automagically updated when you save this file: |
6 @set lastupdate April 27, 2013 | 6 @set lastupdate July 19, 2013 |
7 @c %**end of header | 7 @c %**end of header |
8 | 8 |
9 @dircategory GNU organization | 9 @dircategory GNU organization |
10 @direntry | 10 @direntry |
11 * Standards: (standards). GNU coding standards. | 11 * Standards: (standards). GNU coding standards. |
289 @node Source Language | 289 @node Source Language |
290 @section Which Languages to Use | 290 @section Which Languages to Use |
291 @cindex programming languages | 291 @cindex programming languages |
292 | 292 |
293 When you want to use a language that gets compiled and runs at high | 293 When you want to use a language that gets compiled and runs at high |
294 speed, the best language to use is C. Using another language is like | 294 speed, the best language to use is C. C++ is ok too, but please don't |
295 using a non-standard feature: it will cause trouble for users. Even if | 295 make heavy use of templates. Other languages commonly used in the |
296 GCC supports the other language, users may find it inconvenient to have | 296 free software community, such as Java, Python and Ruby, are ok too. |
297 to install the compiler for that other language in order to build your | 297 Please implement the GNU configure and make interface no matter which |
298 program. For example, if you write your program in C++, people will | 298 language you use. |
299 have to install the GNU C++ compiler in order to compile your program. | |
300 | |
301 C has one other advantage over C++ and other compiled languages: more | |
302 people know C, so more people will find it easy to read and modify the | |
303 program if it is written in C. | |
304 | |
305 So in general it is much better to use C, rather than the | |
306 comparable alternatives. | |
307 | |
308 But there are two exceptions to that conclusion: | |
309 | |
310 @itemize @bullet | |
311 @item | |
312 It is no problem to use another language to write a tool specifically | |
313 intended for use with that language. That is because the only people | |
314 who want to build the tool will be those who have installed the other | |
315 language anyway. | |
316 | |
317 @item | |
318 If an application is of interest only to a narrow part of the community, | |
319 then the question of which language it is written in has less effect on | |
320 other people, so you may as well please yourself. | |
321 @end itemize | |
322 | 299 |
323 Many programs are designed to be extensible: they include an interpreter | 300 Many programs are designed to be extensible: they include an interpreter |
324 for a language that is higher level than C. Often much of the program | 301 for a language that is higher level than C. Often much of the program |
325 is written in that language, too. The Emacs editor pioneered this | 302 is written in that language, too. The Emacs editor pioneered this |
326 technique. | 303 technique. |
331 (@uref{http://www.gnu.org/@/software/@/guile/}), which implements the | 308 (@uref{http://www.gnu.org/@/software/@/guile/}), which implements the |
332 language Scheme (an especially clean and simple dialect of Lisp). | 309 language Scheme (an especially clean and simple dialect of Lisp). |
333 Guile also includes bindings for GTK+/GNOME, making it practical to | 310 Guile also includes bindings for GTK+/GNOME, making it practical to |
334 write modern GUI functionality within Guile. We don't reject programs | 311 write modern GUI functionality within Guile. We don't reject programs |
335 written in other ``scripting languages'' such as Perl and Python, but | 312 written in other ``scripting languages'' such as Perl and Python, but |
336 using Guile is very important for the overall consistency of the GNU | 313 using Guile is the path that will lead to overall consistency of the |
337 system. | 314 GNU system. |
338 | 315 |
339 | 316 |
340 @node Compatibility | 317 @node Compatibility |
341 @section Compatibility with Other Implementations | 318 @section Compatibility with Other Implementations |
342 @cindex compatibility with C and POSIX standards | 319 @cindex compatibility with C and POSIX standards |