<div dir="ltr">Disclaimer: I don't use autotools a lot, nor do I particularly like it. I do see its usefulness though, so I'll support Nadav.<br><br><div class="gmail_quote">2011/1/12 Elazar Leibovich <span dir="ltr"><<a href="mailto:elazarl@gmail.com">elazarl@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"> Wondering whether your user has Bison or AT&T yacc? Use bison and drop yacc support, in a modern system you can expect bison to be supported.</div>
</blockquote><div><br>What's a modern system? I am not going to check bison specifically - it's besides the point, and I suppose you'll agree - but I do not expect that some important target version of AIX or Cygwin will have the same capabilities as Linux, I do not expect them to have the same (versions of) compilers or other elements of the toolchain, the same organization of the filesystem, the same system calls, the same threading model. Nor do I expect that RHEL5.4 and Fedora 14 will have the same stuff. <br>
<br>And then we are going to have fun with porting to all sorts of embedded platforms and "appliances" that have some facilities and do not have others... Not many will have bison (or bash, for that matter).<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div>
</div><div>But that's my point exactly! When you were in this business, the relevant targets were much more scattered and limited than nowadays. It is no longer the state, modern system are much more standardized, and those who don't are not interesting enough. jwz avoided templates in C++ because they weren't widely supported then[*] can you imagine doing that in a modern software?</div>
</div></blockquote><div><br>I remember when MSVC barfed on half of templatized things that compiled and ran on anything that was capable of generating heat. It was not so long ago, around 2001/2002. <br><br>And today I have an #ifdef in some code I wrote a few weeks ago because STL's compose1 and compose2 are officially parts of STL but not (yet) of the C++ standard, and some interesting platforms have them and some don't, and it may depend on the version of g++, caeteris paribus. <br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><br><div><div class="im">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Would Go also compile Solaris? On AIX? On True64 UNIX (if you happen</blockquote><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font face="arial, sans-serif"><span style="border-collapse: collapse;">to have an Alpha machine)? On various versions of Fedora/Debian/Ubuntu/Gentoo</span></font></blockquote>
<font face="arial, sans-serif"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
from the last 10 years? You can say you don't care, but I do.</blockquote></font></div><font face="arial, sans-serif"><div><br></div><div>1) I think that in modern machines where gcc/gawk can run on, it is very likely to compile.</div>
</font></div></div></blockquote><div><br>"Can run on"? Are you going to tell the user to install gcc and gawk first? I doubt it would be acceptable.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div><font face="arial, sans-serif">
<div>2) I'm not sure that in this case (ie, gcc is running on the machine) autotools would make much difference.</div></font></div></div></blockquote><div><br>Right now I am looking at gcc 4.1.2, 4.3.4, and 4.5.1 - they are not the same.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div>Huh? And having #ifdef JAVA5 sprinkled in the code looks like a better idea?</div>
</div></blockquote><div><br>Hmm... Let's see, Java 5 introduced generics and autoboxing, if memory serves. Yes, it does sound like a good idea.<br><br>And for more sophisticated examples, the concurrency semantics are different for just about every java version.<br>
<br>The way java solves the problem, by the way, is that just about every application comes with its own JVM. I recall two applications belonging to a single suite, from the same vendor, that were supposed to work together, and each came with its own JVM, and neither worked with the other JVM.<br>
<br>I remember guessing that it was probably not considered a big problem on Windows because Windows didn't have shared libraries, so memory would be wasted in any case.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Does that means that this is a good idea in general? Does that mean that if I'm writing "hoc" today I'd better of use the autosuite? I really think not.</div></blockquote><div><br>Look, this depends on your requirements. If you stick to writing software that is OK with certain versions of kernel, gcc, gawk, bison, bash, whatever as prerequisites, fine.<br>
<br>I am used to requirements like "Your code must compile and run on anything we may purchase in the future. No, we do not have a complete list of target platforms at the moment." <br><br>Yes, it is possible. Sticking to standards certainly helps. An occasional #ifdef helps. Even bloody #pragmas may be useful once in a blue moon. Autotools may certainly be a lifesaver.<br>
</div></div><br>-- <br>Oleg Goldshmidt | <a href="mailto:oleg@goldshmidt.org">oleg@goldshmidt.org</a><br>
</div>