Is there a future for type checking?
Is there a future for type checking?
Are they are future plans for adding support for type checking? My original question was going to be on the possibility of templates for procedural programming but I believe this would require runtime type checking.
Last edited by Mistrel on Sun May 31, 2009 1:06 am, edited 2 times in total.
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: Is there a future for type checking?
Do you mean templates as in C++ templates? If yes, you would not need runtime type checking for that.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)
Not entirely true, functions can be templated as well:Trond wrote:Templates are just a fancy form of macros (except they create classes, which PB doesn't have).
Code: Select all
template<typename T>
std::string toString(T subject) {
std::stringstream ss;
ss << subject;
return ss.str();
}
Windows 7 & PureBasic 4.4