<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-35928092.post6155040441432892493..comments</id><updated>2008-07-11T11:40:22.071-04:00</updated><category term='ruby'/><category term='NTFS'/><category term='Product Management'/><category term='Windows Mobile'/><category term='User Interface'/><category term='nested class'/><category term='cross-compiling'/><category term='code sample'/><category term='UMPC'/><category term='pay it forward'/><category term='conversion'/><category term='UI'/><category term='web development'/><category term='QC'/><category term='time_t'/><category term='XBAP'/><category term='c#'/><category term='oom'/><category term='PM'/><category term='DOM'/><category term='Browsers'/><category term='popup'/><category term='python'/><category term='wchar_t'/><category term='DACL'/><category term='Mobile Development'/><category term='Visual Basic'/><category term='Single sign-on'/><category term='Win32'/><category term='Flex'/><category term='WM5'/><category term='Android'/><category term='c++'/><category term='IRM'/><category term='audio gateway'/><category term='Application'/><category term='Product Strategy'/><category term='string conversion'/><category term='embedded'/><category term='NTLM'/><category term='SMS'/><category term='Struts'/><category term='App'/><category term='specification'/><category term='semantic'/><category term='Barcamp'/><category term='char'/><category term='CSS'/><category term='Product Creation'/><category term='Javascript'/><category term='QA'/><category term='JCIFS'/><category term='UX'/><category term='RIL'/><category term='SharePoint'/><category term='Java'/><category term='Google'/><category term='time'/><category term='rest'/><category term='outlook'/><category term='mapi'/><category term='file access permissions'/><category term='iPhone'/><category term='Firefox'/><category term='MacCamp'/><category term='Product Development'/><category term='User Experience'/><category term='Maven'/><category term='twitter'/><category term='code quality'/><category term='optimization'/><category term='HTML'/><category term='GPS'/><category term='Authentication'/><category term='Bluetooth'/><category term='Mobile App'/><category term='Netbooks'/><category term='IE'/><category term='Smartphones'/><category term='Internet Explorer'/><category term='SNAPI'/><category term='testing'/><category term='software testing'/><category term='WPF'/><category term='Mobile Application'/><category term='PocketPC'/><category term='compiler'/><category term='.NET'/><title type='text'>Comments on The Macadamian Files: Compile Time Semantic Checking</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thefiles.macadamian.com/feeds/6155040441432892493/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35928092/6155040441432892493/comments/default'/><link rel='alternate' type='text/html' href='http://thefiles.macadamian.com/2008/07/compile-time-semantic-checking.html'/><author><name>Matt Villeneuve</name><uri>http://www.blogger.com/profile/05412817894881938302</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35928092.post-7999426553311144504</id><published>2008-07-11T11:40:00.000-04:00</published><updated>2008-07-11T11:40:00.000-04:00</updated><title type='text'>Neato.  Yeah, range checking would be nice.  I kno...</title><content type='html'>Neato.  Yeah, range checking would be nice.  I know I've seen it done with attributes but it used a special compiler and cost $$ to use I think.&lt;BR/&gt;&lt;BR/&gt;I like that C# allows me to be lazy by using implicit operators ;)  you can just use it as if it were a regular integer without any problem (but you can only update the reference with another UserId so it still gaurentees the value makes sense)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35928092/6155040441432892493/comments/default/7999426553311144504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35928092/6155040441432892493/comments/default/7999426553311144504'/><link rel='alternate' type='text/html' href='http://thefiles.macadamian.com/2008/07/compile-time-semantic-checking.html?showComment=1215790800000#c7999426553311144504' title=''/><author><name>Jake</name><uri>http://www.blogger.com/profile/04529021825096290761</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://thefiles.macadamian.com/2008/07/compile-time-semantic-checking.html' ref='tag:blogger.com,1999:blog-35928092.post-6155040441432892493' source='http://www.blogger.com/feeds/35928092/posts/default/6155040441432892493' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1505260497'/></entry><entry><id>tag:blogger.com,1999:blog-35928092.post-1271476485173017190</id><published>2008-07-10T16:39:00.000-04:00</published><updated>2008-07-10T16:39:00.000-04:00</updated><title type='text'>This was one of the safety features of super-safe ...</title><content type='html'>This was one of the safety features of super-safe Ada. In Ada you can simply declare a new primitive type:&lt;BR/&gt;type UserID is new Integer;&lt;BR/&gt;&lt;BR/&gt;Better yet you can do ranges to prevent overflows and negative values:&lt;BR/&gt;type UserID is range 0 .. 1000;&lt;BR/&gt;&lt;BR/&gt;This does not work like typedef in C, in Ada new types are distinct and not interchangable, ie the compiler will complain.&lt;BR/&gt;&lt;BR/&gt;To get this behaviour in C, you should not use typedef, but instead create a struct:&lt;BR/&gt;typedef struct {&lt;BR/&gt;    int id;&lt;BR/&gt;} UserID;&lt;BR/&gt;&lt;BR/&gt;The disadvantage is that you have to type user_id.id to get the actual value, but there is no runtime overhead for passing by value because UserID is the same size as int.&lt;BR/&gt;&lt;BR/&gt;I am not sure if the C# compiler/runtime has any overhead for structs but I am willing to bet GCC (and any decent compiler) will compile both int and UserID to the same code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35928092/6155040441432892493/comments/default/1271476485173017190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35928092/6155040441432892493/comments/default/1271476485173017190'/><link rel='alternate' type='text/html' href='http://thefiles.macadamian.com/2008/07/compile-time-semantic-checking.html?showComment=1215722340000#c1271476485173017190' title=''/><author><name>Laszlo</name><uri>http://www.blogger.com/profile/01391502301669229019</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://thefiles.macadamian.com/2008/07/compile-time-semantic-checking.html' ref='tag:blogger.com,1999:blog-35928092.post-6155040441432892493' source='http://www.blogger.com/feeds/35928092/posts/default/6155040441432892493' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-924884469'/></entry></feed>
