tag:blogger.com,1999:blog-107818332672551112.post7405152908981067296..comments2023-05-09T12:28:39.315+02:00Comments on Niko Schwarz's science and programming: How to test post-conditionsNikohttp://www.blogger.com/profile/13371452869186247861noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-107818332672551112.post-80231530203652391222010-10-14T04:44:01.764+02:002010-10-14T04:44:01.764+02:00Write unit tests?Write unit tests?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-107818332672551112.post-38322950069614211282010-03-19T14:24:46.440+01:002010-03-19T14:24:46.440+01:00I'm always complaining about still using Java ...I'm always complaining about still using Java as the first language that students learn. In my opinion, it just doesn't fit for this purpose - it's too tedious, too unintuitive, too heavy... It's just no fun to work with it - or to learn programming with it.Joshua Muheimhttp://josh.chnoreply@blogger.comtag:blogger.com,1999:blog-107818332672551112.post-80409793471733126312010-03-19T11:22:29.321+01:002010-03-19T11:22:29.321+01:00Hi Pat,
I receive a lot of pointers to Eiffel. I ...Hi Pat,<br /><br />I receive a lot of pointers to Eiffel. I think the day where I just won't be able to avoid studying it has finally arrived …Nikohttps://www.blogger.com/profile/13371452869186247861noreply@blogger.comtag:blogger.com,1999:blog-107818332672551112.post-89447095963953563672010-03-19T01:49:22.192+01:002010-03-19T01:49:22.192+01:00There is a programming language, which implements ...There is a programming language, which implements pre- and postconditions very well: Eiffel.<br /><br />In Eiffel it's very easy to check pre- and postconditions. But even in this case, a certain additional overhead remains.<br /><br />Cheers PatAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-107818332672551112.post-65931625400468435532010-03-18T22:45:05.034+01:002010-03-18T22:45:05.034+01:00Hi, that's a correct observation. Of course, t...Hi, that's a correct observation. Of course, the Histoory code is in one of these cool languages, and there it's perfectly possible to switch off postconditions. <br /><br />And about Java: I won't comment on my preferences in the scope of the class, but this being my own blog … Java is really missing some advances in programming languages that can be missed only too easily.Nikohttps://www.blogger.com/profile/13371452869186247861noreply@blogger.comtag:blogger.com,1999:blog-107818332672551112.post-77058025088910875342010-03-18T22:35:43.232+01:002010-03-18T22:35:43.232+01:00But what about the overhead of creating these oldS...But what about the overhead of creating these oldSize etc. variables? They should only be created when assertions are turned on, right? So in your version, they are always created.<br /><br />I guess in Ruby (or any other "cool" programming language) you could do such things using blocks or something...<br /><br />assert_postcondition(:old => size, :expected => size + 1) do<br /> size += 1<br />end<br /><br />Oh, right, I forgot how really bothersome java is... What a pitty it's still the programming language #1 that's taught at the universities...<br /><br />Sincerely yours, the pretty good student ;-)Joshua Muheimhttp://josh.chnoreply@blogger.com