18. Backward Compatibility

  Pike is a language under active development. This can lead to incompatibilities between different versions of Pike. To alleviate this problem Pike has a backward compatibility layer.

  The backward compatibility layer can be engaged in two ways; either by starting the Pike interpreter with the `-V` option, or by using the `#pike` preprocessor directive.

  The backward compatibility layer affects both the compiler and the available modules.

  Note that the backward compatibility layer does not necessarily compensate for all incompatibilities documented here, and that there may be other incompatibilities that have not been documented.

  The remainder of this chapter describes the main incompatibilities between the various versions of Pike and the current version.

18.1. Pike 7.8

18.1.1. Global Functions

  decode_value() used to be able to decode programs using the 'old style' program encoding.

18.1.2. Modules

  The SSL module API has had major changes since Pike 7.8.

  The following modules and functions have moved, been renamed or been deleted:

  7.8::Gdbm.gdbm | Gdbm.DB
  7.8::Locale.Charset | Charset
  7.8::SSL.alert | SSL.Alert
  7.8::SSL.connection + 7.8::SSL.handshake | SSL.ClientConnection + SSL.ServerConnection
  7.8::SSL.context | SSL.Context
  7.8::SSL.packet | SSL.Packet
  7.8::SSL.session | SSL.Session
  7.8::SSL.sslfile | SSL.File
  7.8::SSL.sslport | SSL.Port
  7.8::SSL.state | SSL.State
  7.8::Tools.PEM | Standards.PEM
  7.8::Tools.X509 | Standards.X509
  7.8::Yabu.db | Yabu.DB
  7.8::Yabu.table | Yabu.Table
  7.8::_PGsql | (deleted>
  7.8:_files | _Stdio

18.1.3. Compiler

  The compiler used to not complain about use of the keyword `static`.

  The ancient syntax for arrays (`string *` was an alias for `array(string)`) used to be supported (but complained about), but has now been removed completely.

18.1.4. Build options

  The builtin security sandbox has been deprecated.

  Compiling without support for bignums is no longer supported.

  The (optional) support for facet classes has been removed.

18.2. Pike 7.6

18.2.1. Modules

  Signal handlers in GTK2 used to get their arguments in the form of an array.

  Sql.mysql used to automatically attempt to reconnect on broken connection.

  The following modules and functions have moved, been renamed or been deleted:

  ADT.Heap.size() | Deprecated by ADT.Heap._sizeof()
  ADT.Heap.top() | Deprecated by ADT.Heap.pop()
  7.6::Array.transpose_old | (deleted)
  7.6::Image.colortable | Image.Colortable
  7.6::Image.font | Image.Font
  7.6::Image.image | Image.Image
  7.6::_Charset | Locale.Charset.module
  7.6::spider.isbasechar() | Parser.XML.isbasechar()
  7.6::spider.iscombiningchar() | Parser.XML.iscombiningchar()
  7.6::spider.isdigit() | Parser.XML.isdigit()
  7.6::spider.isextender() | Parser.XML.isextender()
  7.6::spider.isfirstnamechar() | Parser.XML.isfirstnamechar()
  7.6::spider.ishexchar() | Parser.XML.ishexchar()
  7.6::spider.isidographic() | Parser.XML.isidographic()
  7.6::spider.isletter() | Parser.XML.isletter()
  7.6::spider.isnamechar() | Parser.XML.isnamechar()
  7.6::spider.isspace() | Parser.XML.ispace()

18.2.2. Compiler

  The compiler used to not complain about use of the keyword `nomask`.

18.2.3. Runtime

  The `main()` function used to get the environment as a mapping in argument number three.

  The API for Debug.describe_program() was different.

18.3. Pike 7.4 and earlier

18.3.1. Deprecated

  The backward compatibility code for Pike 7.4 and earlier has been removed in Pike 8.0.