Jump to page: 1 2
Thread overview
D got it right!
Apr 04, 2005
Lionello Lunesu
Apr 04, 2005
Sean Kelly
Apr 04, 2005
Lemon Sented
Apr 04, 2005
Lemon Sented
Apr 04, 2005
Walter
Apr 05, 2005
Georg Wrede
Apr 05, 2005
Sean Kelly
Apr 05, 2005
bobef
Apr 05, 2005
Lionello Lunesu
Apr 04, 2005
Matthew
Apr 05, 2005
Lionello Lunesu
Apr 04, 2005
Benjamin Herr
Apr 05, 2005
Lionello Lunesu
Apr 05, 2005
Lionello Lunesu
Apr 05, 2005
Dave
Apr 06, 2005
Lionello Lunesu
April 04, 2005
I've just installed .NET 2005 februari preview release and tried to compile my current projects (made using VC6), and got thousands of these:

warning C4996: 'fopen' was declared deprecated

In fact, all methods taking a zero-terminated string are deprecated and for those that don't have a version taking a size_t, a new method ending in _s (fopen_s) was added, taking an extra size_t for the size of the string.

This was done to cut back on buffer-overflow hacks, obvisously.

But what a great decision to get rid of zero-terminated strings in D, and make it an array which knows it's size!

I sooo want to program in D, but I can't really get even a simple project finished (I'm converting FART to D, http://fart-it.sf.net/ )

I'd say the whole CRT/libc stuff should be deprecated in D. Phobos should be a library using only D. If you're porting a C/C++ project, you'll link to some crt.d files, but I believe they should not be a part of Phobos. Lets get rid of those zero-terminated strings once and for all.

Lionello.


April 04, 2005
In article <d2r9ei$1rgo$1@digitaldaemon.com>, Lionello Lunesu says...
>
>I've just installed .NET 2005 februari preview release and tried to compile my current projects (made using VC6), and got thousands of these:
>
>warning C4996: 'fopen' was declared deprecated
>
>In fact, all methods taking a zero-terminated string are deprecated and for those that don't have a version taking a size_t, a new method ending in _s (fopen_s) was added, taking an extra size_t for the size of the string.

Great, now I'll have another warning to add to my ignore list.  I think the VC++ team tends to be one of the best at that company, but how they can deprecate functions required by the standard is beyond me.

>This was done to cut back on buffer-overflow hacks, obvisously.

Indeed.  But is it really necessary to do this just because the folks at Microsoft can't write secure code?

>But what a great decision to get rid of zero-terminated strings in D, and make it an array which knows it's size!

Indeed.  D does a lot of things that make sense in retrospect.

>I sooo want to program in D, but I can't really get even a simple project finished (I'm converting FART to D, http://fart-it.sf.net/ )

What's wrong?


Sean


April 04, 2005
Sean Kelly wrote:

>>I've just installed .NET 2005 februari preview release and tried to compile my current projects (made using VC6), and got thousands of these:
>>
>>warning C4996: 'fopen' was declared deprecated

> Great, now I'll have another warning to add to my ignore list.  I think the VC++
> team tends to be one of the best at that company, but how they can deprecate
> functions required by the standard is beyond me.

LOL, "they are the best at that company, and they still suck"

If I were to spend like $800, I would probably get CodeWarrior.
But then again, I probably am not - and just use GCC instead...

--anders
April 04, 2005
"Lionello Lunesu" <lio@lunesu.removethis.com> wrote in message news:d2r9ei$1rgo$1@digitaldaemon.com...
> I've just installed .NET 2005 februari preview release and tried to compile my current projects (made using VC6), and got thousands of these:
>
> warning C4996: 'fopen' was declared deprecated
>
> In fact, all methods taking a zero-terminated string are deprecated and for those that don't have a version taking a size_t, a new method ending in _s (fopen_s) was added, taking an extra size_t for the size of the string.
>
> This was done to cut back on buffer-overflow hacks, obvisously.

Hmmm. Since such functions are standard, how can they be deprecated? A very perverse take on reality.

Also, UNIX/Mac systems are written in standard C and, though they do have/have had security issues with overflows, they're hardly in the Windows league. Maybe it's not just the standard library functions???

> But what a great decision to get rid of zero-terminated strings in D, and make it an array which knows it's size!

Agreed. I think slices are the best part of D (and, when I'm in one of those Doldrums, the only feature that keeps me tagging along).

> I'd say the whole CRT/libc stuff should be deprecated in D. Phobos should be a library using only D. If you're porting a C/C++ project, you'll link to some crt.d files, but I believe they should not be a part of Phobos. Lets get rid of those zero-terminated strings once and for all.

That's an interesting take. Clean delineation of abstraction levels is a good thing, but not always a popular one.



April 04, 2005
> If I were to spend like $800, I would probably get CodeWarrior. But then again, I probably am not - and just use GCC instead...


Visual C++ 7.1 cmd line tool set is free, and is a *very* good compiler, in my personal best 3 (along with Intel and CodeWarrior; GCC is a close 4th).

Visual Studio .NET is not free, is a gargantuan resource consumer (1-2GB install, 50MB+ running), is incredibly slow, takes 10 minutes to load on a 2GHz+512MB machine, and, worst of all, makes you use the mouse for almost everything.

So, I'd suggest you *do* use VC++, but that you *do not* buy any of the Visual Studio stuff.



April 04, 2005
Lionello Lunesu wrote:
> I've just installed .NET 2005 februari preview release and tried to compile my current projects (made using VC6), and got thousands of these:
> 
> warning C4996: 'fopen' was declared deprecated

Hm. I assume that the WinAPI comes with evil functions to open files by UTF-16 names, and that fopen cannot take UTF-16 strings and thus not open all files, so it is quite inaquedate for Windows.

What am I missing?

--Benjamin
April 04, 2005
Lemon Sented wrote:

> Visual C++ 7.1 cmd line tool set is free,
> and is a *very* good compiler, in my personal  best
> 3 (along with Intel and CodeWarrior; GCC is a close 4th).

I'm using GCC for portability and familarity
(plus that it is Free Software / Open Source),

but I found Digital Mars C/C++ to be pretty quick...
Unfortunately not available for Mac OS X or Linux.

--anders
April 04, 2005
"Anders F Björklund" <afb@algonet.se> wrote in message news:d2sboe$6tq$1@digitaldaemon.com...
> Lemon Sented wrote:
>
>> Visual C++ 7.1 cmd line tool set is free,
>> and is a *very* good compiler, in my personal  best
>> 3 (along with Intel and CodeWarrior; GCC is a close 4th).
>
> I'm using GCC for portability and familarity
> (plus that it is Free Software / Open Source),
>
> but I found Digital Mars C/C++ to be pretty quick... Unfortunately not available for Mac OS X or Linux.

It's very quick, but still costs more than its fair share of time
(wrt the other compilers) in workarounds for advanced
(c. 1998-2002) features.

But Walter's doing a great job catching up:
it's rate of improvement it better than the others.





April 04, 2005
"Lemon Sented" <lemons@sent.ed> wrote in message news:d2schr$7p4$1@digitaldaemon.com...
> But Walter's doing a great job catching up:
> it's rate of improvement it better than the others.

Take a look at the preprocessor fixes in the new beta, making DMC++ highly compliant in the preprocessor department - even more compliant in some cases than Spirit Wave is (DMC++ will compile the 'book' examples correctly, Wave doesn't).


April 05, 2005
Lemon Sented wrote:
>>If I were to spend like $800, I would probably get CodeWarrior.
>>But then again, I probably am not - and just use GCC instead...
> 
> 
> 
> Visual C++ 7.1 cmd line tool set is free, and is a *very* good compiler, in my personal best 3 (along with Intel and CodeWarrior; GCC is a close 4th).
> 
> Visual Studio .NET is not free, is a gargantuan resource consumer (1-2GB install, 50MB+ running), is incredibly slow, takes 10 minutes to load on a 2GHz+512MB machine, and, worst of all, makes you use the mouse for almost everything.
> 
> So, I'd suggest you *do* use VC++, but that you *do not* buy any of the Visual Studio stuff.
> 
> 
> 

Maybe you should try DMC++.

-- 
Carlos Santander Bernal

JP2, you'll always live in our minds
« First   ‹ Prev
1 2