November 27, 2006
Arr!
gdc -c, of course.

Alexander Panek wrote:
> %u, (:P)
> 
> as soon as you compile to object files and do the linking yourself, you are in any way getting undefined references to some GC functions, as soon as you try to use GC-enabled features, anyways. And as this thread is about OSnews discussions, in OS development, you *do* link yourself anyways (gcc -c, ld -Tlinker-script).
> 
> Kind regards,
> Alex
> 
> %u wrote:
>>>>> No? Hypothetical: your boss dumps a million lines of D code in your lap and says,
>>>>> "Verify that this avoids the GC in all possible circumstances". What do you do?
>>>>> What do you grep for? What tests do you run?
>>>> I'd probably begin by hooking the GC collection routine and dumping data
>>>> on what was being cleaned up non-deterministically.
>>> 1.  If possible, relink without the GC library. If that fails, it
>>>    doesn't necessarily mean the GC gets used, so relink with
>>>    the GC library patched so that any attempt to allocate memory from
>>>    the GC heap fails with a loud noise.
>>>
>>> 2.  Run all unit tests, and check that full coverage is achieved.
>>> Of course that assumes that there *are* unit tests...
>>
>>
>> It should be as simple as choosing a compile option
>> and letting the compiler complain the use of GC.
November 27, 2006
Don Clugston wrote:
> I think it's even worse than that. The opposite of 'unsafe' is *not* safe!
> 
> My brother has worked with medical software which contain software bugs which kill people. And the bugs are NOT 'dangling pointers', they are incorrect mathematics (wrong dosage, etc). The code is 'safe', yet people have been taken out in body bags.
> 
> I think this whole "safe"/"unsafe" concept can be distracting -- the goal is software with no bugs! It's just a tool to reduce a specific class of bugs. D does many features which help to reduce bugs, the concept of 'safe' code just isn't one of them.

I actually like the "unsafe" keyword in C# (never used C++.NET).

The words "safe" and "unsafe" refer only to type-safety, so it would be more accurate (but cumbersome) if the keyword was "untypesafe" to indicate blocks of code circumventing the type system.

It's nice to know that the default assumption in C# is that nearly all code will subject itself to the compiler's static type checking. Sure, sometimes it's necessary circumvent the type system by casting pointers, but I think it helps enforce good programming practice that those untypesafe operations have to be specifically annotated before the compiler will accept them.

--benji
November 27, 2006
Benji Smith wrote:
> 
> It's nice to know that the default assumption in C# is that nearly all code will subject itself to the compiler's static type checking. Sure, sometimes it's necessary circumvent the type system by casting pointers, but I think it helps enforce good programming practice that those untypesafe operations have to be specifically annotated before the compiler will accept them.

But isn't the presence of a cast annotation in itself?


Sean
November 27, 2006
On Mon, 27 Nov 2006, Benji Smith wrote:

> Date: Mon, 27 Nov 2006 12:59:45 -0700
> From: Benji Smith <dlanguage@benjismith.net>
> Reply-To: digitalmars.D <digitalmars-d@puremagic.com>
> To: digitalmars-d@puremagic.com
> Newsgroups: digitalmars.D
> Subject: Re: OSNews article about C++09 degenerates into C++ vs. D discussion
> 
> Don Clugston wrote:
> > I think it's even worse than that. The opposite of 'unsafe' is *not* safe!
> > 
> > My brother has worked with medical software which contain software bugs which kill people. And the bugs are NOT 'dangling pointers', they are incorrect mathematics (wrong dosage, etc). The code is 'safe', yet people have been taken out in body bags.
> > 
> > I think this whole "safe"/"unsafe" concept can be distracting -- the goal is software with no bugs! It's just a tool to reduce a specific class of bugs. D does many features which help to reduce bugs, the concept of 'safe' code just isn't one of them.
> 
> I actually like the "unsafe" keyword in C# (never used C++.NET).
> 
> The words "safe" and "unsafe" refer only to type-safety, so it would be more accurate (but cumbersome) if the keyword was "untypesafe" to indicate blocks of code circumventing the type system.
> 
> It's nice to know that the default assumption in C# is that nearly all code will subject itself to the compiler's static type checking. Sure, sometimes it's necessary circumvent the type system by casting pointers, but I think it helps enforce good programming practice that those untypesafe operations have to be specifically annotated before the compiler will accept them.
> 
> --benji

(Sorry Benji.. using your post to reply to this thread.  I'm not specifically replying to your post, just gotta have that hook.)

I really hate the term 'safe'.  It's ambiguous.  What's safe?  How safe? It's just as useless a term as 'managed'.  Both terms are specifically designed to enduce that warm fuzzy feeling and sidestepping the issue of what they actually really mean.

I recognize that a major portion of my own personal bias against VM based runtime environments is due to the frequent association with this sort of need for warm fuzzies with a careful avoidance to specifying the exact real gained benefits.  I fully recognize that there _are_ benefits, just that the conflation with non-specific benefits diminishes the whole picture in my world-view.

Grumble,
Brad
November 28, 2006
John Reimer wrote:
> On Fri, 24 Nov 2006 19:29:07 -0800, Steve Horne  <stephenwantshornenospam100@aol.com> wrote:
> 
>> On Wed, 22 Nov 2006 09:53:41 -0800, Sean Kelly <sean@f4.ca> wrote:
>>
>>> Walter Bright wrote:
>>
>>
>>>> That's to be expected. Many people have bet their careers on C++ being
>>>> the greatest ever, and nothing can change their mind.
>>
>>
>>> That said, I do agree that C++ is an "older"
>>> language in terms of its users, and that D is much "younger" in this
>>> respect.  It makes perfect sense.  C++ has been around for a long time
>>> and D has not, and few professional programmers seem inclined to learn
>>> new things.  If anything, they're more likely to refine their existing
>>> skill set and stick to their "specialty."
>>
>>
>> Oh no. C++ is the new COBOL. AAARRRGGGHHH!!!
>>
> 
> 
> He he.. It's inevitable... the languages start to date developers.
> 
> The same thing works for operating systems.  When I mention I used some of  the very first Slackware linux releases in the 1990s (maybe around 19993  or 94) because I was desperate to move away from the DOS/Win16 platform...  well, even a minor thing like that starts dating me among the younger  generation of linux gurus (a linux guru, I am not... still after all these  years).  At 31, I'm an in-betweener... not that old... but old enough that  computer history is leaving it's mark in my memories. :)

Uh-oh.

Reading that made me feel ancient. I wrote my first programs in FORTRAN, back in the 1960's. And I still have three different computers that run CP/M (what we had before Microsoft). And yes, I still play with them occasionally. Last week I spent two hours reading the CP/M ASM listing of the Osborne.

And I regularly have my HP 28S calculator near when I do programming. (Made in 1986.) It mixes a version of Forth and RPN, and I feel it's hugely more usable than even today's calculators.

Guess I'm simply a prehistoric relic.
November 28, 2006
On Tue, 28 Nov 2006 02:28:21 +0200, Georg Wrede <georg.wrede@nospam.org> wrote:

>Uh-oh.
>
>Reading that made me feel ancient. I wrote my first programs in FORTRAN, back in the 1960's. And I still have three different computers that run CP/M (what we had before Microsoft). And yes, I still play with them occasionally. Last week I spent two hours reading the CP/M ASM listing of the Osborne.
>
>And I regularly have my HP 28S calculator near when I do programming. (Made in 1986.) It mixes a version of Forth and RPN, and I feel it's hugely more usable than even today's calculators.
>
>Guess I'm simply a prehistoric relic.

Well, I wasn't born until 71, and I'm basically a child of the Basic/Pascal/C and 8-bit micros generation, but I'm feeling like a prehistoric relic too. I'll tell you what, I'll be the fossil from the Cretaceous - you can be Jurassic ;-)

-- 
Remove 'wants' and 'nospam' from e-mail.
2 3 4 5 6 7 8 9 10 11 12
Next ›   Last »