[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Microsoft's C/C++ compiler freely available

Nathaniel Talbott

11/15/2003 1:55:00 PM

Daniel Carrera [mailto:dcarrera@math.umd.edu] wrote:

> Question:
> Why would you want to use Microsoft's C/C++ compiler when gcc is
> available? No sarcasm. This is an honest question.

A few reasons:

- Ease of setup. I've tried to use Mingw before, and found it to be a
nasty mess of dependencies with opaque documentation. Couldn't get it to
work. Perhaps this has changed; perhaps not.
- When in Rome, do as the Romans do. Seriously, if you're coding on
Windows, it makes sense to use Windows-centric tools in a lot of cases. I'm
just glad folks can do that now without forking over any $$$.
- Binary compatibility? I seem to remember someone saying that a Ruby
built with Mingw cannot load extensions that are built with MSVC, and vice
versa. And unlike Linux and its brethren (cousins, ancestors, etc), it is
standard to ship binaries and not source. Thus, it's important to know that
you can ship a binary and it will run without trouble, and the best way to
do that is to compile it with MSVC, since it IS the de facto standard on
Windows, like it or not.
- Ease of use. It seems that every time I see Mingw referred to, it's
someone asking, "How in the world do I get X to build under Mingw?!? I've
tried and it won't work!" Whereas, as a general rule, I don't see the same
issues coming up with MSVC. This is really a subjective measure, but
subjectively speaking, I don't like the results.
- Short learning curve for Windows programmers. Windows is really it's own
environment, and to support it well, we need folks working on it that
specifically know Windows. It's therefore good to make it as easy as
possible for those folks to contribute code to Ruby, and if they're Windows
coders already, they're almost assuredly used to MSVC. Now someone who codes
for Windows at work can come home in the evenings and code for Ruby, without
having to buy himself a copy of MSVC or having to learn a completely new
environment.
- The One-click Windows Installer is built using MSVC. All of the possible
build options were looked at, and MSVC was chosen. Now anyone can help
maintain and contribute to that project without having to buy anything.
That's cool.
- Just because I'm stubborn? Seriously, now that this is free, I'd be very
hard pressed to use anything else. Probably not worth trying to convince me
otherwise. If Mingw is truly better, then eventually I'll see the light and
switch.

I'm certainly not saying "You're an idiot if you use Mingw instead of
MSVC!"; if it works for you, great! But I am saying that one should use the
right tool for the job, and I think it's excellent that this tool (MSVC) has
become freely available. I've heard folks complain many times in the past
that they can't afford or don't want to shell out for MSVC, and that's not a
problem anymore. I consider growth in choices to be a plus.

You asked a non-sarcastic question, and this is my attempt at a
non-sarcastic answer. I hope it helps answer your question, but it is NOT
intended to start a holy war. Again, if you prefer using something like
Mingw on your computer, great. I don't.


Nathaniel

<:((><


5 Answers

Daniel Carrera

11/16/2003 5:28:00 AM

0

On Sat, Nov 15, 2003 at 10:55:26PM +0900, Nathaniel Talbott wrote:

> I'm certainly not saying "You're an idiot if you use Mingw instead of
> MSVC!"; if it works for you, great! But I am saying that one should use the
> right tool for the job,

Thank you for the disclaimer.

I don't use MinGW for the simple reason that I don't use Windows. My
comments and my views come from gcc under Linux, Solaris and AIX. Under
these systems, gcc is fantastic. Certainly better than the Sun compiler.
I find it easier to use, and much more dependable.


> You asked a non-sarcastic question, and this is my attempt at a
> non-sarcastic answer. I hope it helps answer your question, but it is NOT
> intended to start a holy war. Again, if you prefer using something like
> Mingw on your computer, great. I don't.

Thank you for the disclaimer. I wondered for a second. It WAS just a
question. I don't use MinGW, like I just said.

Cheers,
--
Daniel Carrera | Aleph-0 bottles of beer on the wall, Aleph-0 bottles
PhD student. | of beer. Take one down, pass it around, Aleph-0
Math Dept. | bottles of beer on he wall...
UMD, | http://mathworld.wolfram.com/Al...

Chris Thomas

11/16/2003 10:01:00 PM

0


On Nov 15, 2003, at 9:27 PM, Daniel Carrera wrote:

> I don't use MinGW for the simple reason that I don't use Windows. My
> comments and my views come from gcc under Linux, Solaris and AIX.
> Under
> these systems, gcc is fantastic. Certainly better than the Sun
> compiler.
> I find it easier to use, and much more dependable.

That may not be difficult. Historically, Unix vendor compilers have
tended to suck. IMHO, GCC is adequate. I wouldn't call it "fantastic."
They're working on it, however. Each release is an improvement.

Chris


Daniel Carrera

11/16/2003 10:37:00 PM

0

On Mon, Nov 17, 2003 at 07:00:52AM +0900, Chris Thomas wrote:

> >I don't use MinGW for the simple reason that I don't use Windows. My
> >comments and my views come from gcc under Linux, Solaris and AIX.
> >Under
> >these systems, gcc is fantastic. Certainly better than the Sun
> >compiler.
> >I find it easier to use, and much more dependable.
>
> That may not be difficult. Historically, Unix vendor compilers have
> tended to suck. IMHO, GCC is adequate. I wouldn't call it "fantastic."
> They're working on it, however. Each release is an improvement.


Well, I love it. It makes good code, fairly fast, not too large, it
complies things I'd expect it would, and it has a significant collection of
options. It comes with a debugger. I like the --Wall flag. I think that
it's conceptually better than the 'lint' program used by other unices (or is
it just Sun?). I don't like the idea of using different programs for
compiling and syntax checking, since they might have slightly different
ideas of what constitutes good code.

What problems have you had with it?

Cheers,
--
Daniel Carrera | Aleph-0 bottles of beer on the wall, Aleph-0 bottles
PhD student. | of beer. Take one down, pass it around, Aleph-0
Math Dept. | bottles of beer on the wall...
UMD. | http://mathworld.wolfram.com/Al...

Martin Weber

11/16/2003 11:51:00 PM

0

Okay, we're getting way OT here..

On Mon, Nov 17, 2003 at 07:37:03AM +0900, Daniel Carrera wrote:
> (...) I like the --Wall flag. I think that
> it's conceptually better than the 'lint' program used by other unices (or is
> it just Sun?). (...)

Nope(*). lint by itself is a very nice tool for checking code for, let's say
valid but dubious C code. Consider the following two examples:

switch (ayaken) {
case BANZAI:
fprintf(stderr, "woohoo! banzai!\n");
default:
abort();
}

and

switch (ayaken) {
case BANZAI:
fprintf(stderr, "woohoo! banzai!\n");
/* FALLTHROUGH */
default:
abort();
}

gcc -Wall won't complain about either of these (except BANZAI/ayaken
might be an enum and we don't cover all of it here), but the second
case is lint-safe. It also documents that it is *no* forgetting of the
break;. lint checks code on another dimension than gcc. It also catches
(some/many/an awful lot of) problems gcc doesn't/can't/won't ever. The
use of lint is totally orthogonal to (g)cc -W<anything>. I think there's
a fair amount of documentation about the use of lint and where it makes
sense and where it doesn't. AFAIK there's even an O'Reilly Book (Code
checking with lint or sth similar).

I wouldn't call gdb (an absolutely orthogonal tool not having anything
to do with gcc except for reading debugging information from the executable
which gcc put there -- any compiler can do that) a useless tool either ...

Nor gprof, dmalloc or other allocation checker (programs or libraries).
Those are just a bunch of development tools, and using them wisely, and
knowing how to use them, WILL improve the quality of (C-) code you are
writing. Agreeing to their standards (most of the time) means agreeing to
what commonly is viewed as 'good' C-Code.

With kind regards,

-Martin

(*): Any unix should have a lint, really. BSD has one, I suppose linux
has one, too (mutter: although my last base installation didn't even have
RCS!!!), and it's fine solaris has one, too.


Ollivier Robert

11/22/2003 2:19:00 PM

0

In article <20031116052729.GB1511@math.umd.edu>,
Daniel Carrera <dcarrera@math.umd.edu> wrote:
> comments and my views come from gcc under Linux, Solaris and AIX. Under
> these systems, gcc is fantastic. Certainly better than the Sun compiler.
> I find it easier to use, and much more dependable.

That's true except for code quality. The proprietary compilers on Sun,
DEC^WCompaq^WHP and Intel (icc) are generally way better in code generation
than gcc. The main thing about gcc is that it is there and free.

--
Ollivier ROBERT -=- Eurocontrol EEC/ITM -=- roberto@eurocontrol.fr
Usenet Canal Historique FreeBSD: The Power to Serve!