assert that with (have you hugged your compiler today)

Programming, for all ages and all languages.
Octocontrabass
Member
Member
Posts: 5512
Joined: Mon Mar 25, 2013 7:01 pm

Re: assert that with (have you hugged your compiler today)

Post by Octocontrabass »

mikegonta wrote:No actual assembly language is generated and there is no assembler.
It still sounds like an assembler to me, even if the language you're using is "put the u32 into the other u32;" instead of "mov esi, [esp+4]; mov edi, [esp+8]; mov eax, [esi]; mov [edi], eax;".
mikegonta wrote:The generation of x64, elf for Linux, C and object file format are on my todo list.
Perhaps you should consider generating LLVM IR. It'll speed up porting to other binary formats, and LLVM includes an optimizer for it.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: assert that with (have you hugged your compiler today)

Post by iansjack »

As a general comment on this subject, you might like to look at Eiffel which supports a framework of contracts and assertions far superior to the simple assertions discussed here. It's not my favourite language but it's worth looking at if you are interested in assertions of program correctness.
Post Reply