Pragmatic directives: Difference between revisions
Content added Content deleted
(Add Factor) |
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
||
Line 22: | Line 22: | ||
* [http://www.adaic.org/resources/add_content/standards/05rm/html/RM-L.html Annex L - Language-Defined Pragmas] |
* [http://www.adaic.org/resources/add_content/standards/05rm/html/RM-L.html Annex L - Language-Defined Pragmas] |
||
* [http://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Pragmas.html GNAT Implementation Defined Pragmas] |
* [http://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Pragmas.html GNAT Implementation Defined Pragmas] |
||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
Line 352: | Line 351: | ||
<lang perl>no warnings; # disable warnings pragma module |
<lang perl>no warnings; # disable warnings pragma module |
||
no strict; # disable strict pragma module</lang> |
no strict; # disable strict pragma module</lang> |
||
⚫ | |||
⚫ | |||
⚫ | The Perl 6 pragma mechanism is nearly identical to Perl 5's, piggybacking on the notation for importing modules (pragmas are distinguished by case from normal modules, which are generally of mixed case). By convention pragmas are lowercase, unless they are indicating the use of an unsafe feature, in which case they are in all caps. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
Line 497: | Line 488: | ||
Racket eschews pragmas that are specified outside of the language. However, one can view Racket's <tt>#lang</tt> mechanism as a much more powerful tool for achieving similar things. For example, normal code starts with <tt>#lang racket</tt> -- giving you a very Scheme-like language; change it to <tt>#lang typed/racket</tt> and you get a similar language that is statically typed; use <tt>#lang lazy</tt> and you get a Racket-like language that has lazy semantics; use <tt>#lang algol60</tt> and you get something that is very different than Racket. (And of course, you can implement your own language quite easily.) |
Racket eschews pragmas that are specified outside of the language. However, one can view Racket's <tt>#lang</tt> mechanism as a much more powerful tool for achieving similar things. For example, normal code starts with <tt>#lang racket</tt> -- giving you a very Scheme-like language; change it to <tt>#lang typed/racket</tt> and you get a similar language that is statically typed; use <tt>#lang lazy</tt> and you get a Racket-like language that has lazy semantics; use <tt>#lang algol60</tt> and you get something that is very different than Racket. (And of course, you can implement your own language quite easily.) |
||
⚫ | |||
(formerly Perl 6) |
|||
⚫ | |||
⚫ | The Perl 6 pragma mechanism is nearly identical to Perl 5's, piggybacking on the notation for importing modules (pragmas are distinguished by case from normal modules, which are generally of mixed case). By convention pragmas are lowercase, unless they are indicating the use of an unsafe feature, in which case they are in all caps. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|REXX}}== |
=={{header|REXX}}== |