Historical Deprecated40, Revision 1
Deprecated Items in 4.0
Include Files
This may sound drastic, but all include/*.e are deprecated. With 4.0 comes a newly organized standard library that is located in include/std. To use, you simply:
include std/sequence.e include std/datetime.e as dt include std/map.e as map
for example.
platform()
Platform has not been deprecated however it's use will slowly dwindle as we have a better construct now that does platform checks as well as conditional compilation. ifdef is superior to platform(). An example replacement of platform():
include misc.e if platform() = LINUX then puts(1, "Linux\n") elsif platform() = WIN32 then puts(1, "Windows\n") elsif platform() = DOS32 then puts(1, "DOS\n") else puts(1, "Unknown OS\n") end if
New code:
include misc.e ifdef LINUX then puts(1, "Linux\n") elsifdef WIN32 then puts(1, "Windows\n") elsifdef DOS32 then puts(1, "DOS\n") else puts(1, "Unknown OS\n") end ifdef
For all the benefits of ifdef please see the new 4.0 Manual.
- diff to current revision, view current revision history, backlinks
- Last modified Jul 18, 2008 by jeremy