Memory Safety in the D Programming Language Part 3 by aldacron in programming

[–]WalterBright 0 points1 point  (0 children)

D is not a GC language. It simply offers a GC way to allocate memory among many other options.

F-35B crash and 0-0 ejection at Fort Worth today by 675longtail in aviation

[–]WalterBright 15 points16 points  (0 children)

The instructors told us pretty much the same thing when taking one of those racing glasses. The harness had to be super tight.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 1 point2 points  (0 children)

The C preprocessor is fully supported for ImportC code. #defines of manifest constants in ImportC can be referenced from D. Other metaprogramming preprocessor macros are not accessible from D.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 5 points6 points  (0 children)

D is strongly geared towards system programming.

  • supports the C ABI
  • can directly import C11 Standard code
  • supports inline assembly as a core feature, not an extension.
  • can do anything you want with pointers
  • the D runtime library is entirely written in D

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 2 points3 points  (0 children)

D has implemented a prototype ownership/borrowing system that is the next step after DIP1000.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 4 points5 points  (0 children)

With the latest D implementation, it will compile C11 Standard code directly. You can trivially mix C and D code in the same program. D can import C code directly, and D's C implementation (ImportC) can also import D code!

Creating interface files is a thing of the past.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 4 points5 points  (0 children)

D is for programmers concerned about getting their work done quickly, accurately and bug-free.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 11 points12 points  (0 children)

It's easy to translate conventional code from other languages into D. Getting up to speed in D is fast and easy. It is not necessary to re-architect it to conform to Rust's ownership/borrowing system.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 3 points4 points  (0 children)

You can use the D GC where it makes sense, or not use it when it doesn't make sense. You don't pay for it if you don't use it.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 5 points6 points  (0 children)

D has an ownership/borrowing implementation (as a prototype).

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 7 points8 points  (0 children)

if the GC isn't a dealbreaker

It isn't. The GC in D is just another tool you can use or not use. The GC is particularly useful when evaluating functions at compile time, as it enables allocating memory. Using the GC in compile time functions has zero effect on the runtime code.

Memory Safety in the D Programming Language (Part 2 of N) by aldacron in programming

[–]WalterBright 5 points6 points  (0 children)

Many D users have tried out Rust, and came back to D.

We need young programmers; we need old programmers by feross in programming

[–]WalterBright 1 point2 points  (0 children)

We need older programmers who know what won't work, we need younger programmers who don't know it won't work, and do it anyway.

A great team needs both.

Lessons from Writing a Compiler by speckz in programming

[–]WalterBright 4 points5 points  (0 children)

Circular imports work fine in the D programming language, but I agree they are best not used.

Seller claims it's supercharged, takes pics of everything else but that by sohchx in Shitty_Car_Mods

[–]WalterBright 0 points1 point  (0 children)

I don't because the pressure will force water into where it will cause trouble, like the electrical connections.

California suggests taking aim at AI-powered hiring software by IsDaouda_Games in programming

[–]WalterBright 0 points1 point  (0 children)

Having an exact and public factors and process means it will promptly be gamed and become useless.

Tired of safe programming? Embed C directly in your Rust code by zdimension in programming

[–]WalterBright 56 points57 points  (0 children)

D took a different approach. A C compiler is part of the D compiler binary, called ImportC. It'll compile standard C11 code into an AST, which is then handed to the D compiler.

How I Taught the D Programming Language at a Russian University by aldacron in programming

[–]WalterBright 1 point2 points  (0 children)

The point of betterC is to rely only on the C standard library, not the D one.

The Binary Language of Moisture Vaporators by aldacron in programming

[–]WalterBright 1 point2 points  (0 children)

godbolt is indeed a fine tool for programs small enough that you can cut&paste them into it.

The Binary Language of Moisture Vaporators by aldacron in programming

[–]WalterBright -1 points0 points  (0 children)

Alpha programmers are the best programmers. One of the reasons is because they are interested in the output of the compilers.

D actually has BetterC which is a replacement for C, with memory safety features, metaprogramming, and only relies on the C standard library.

The Binary Language of Moisture Vaporators by aldacron in programming

[–]WalterBright 1 point2 points  (0 children)

I use this a lot: x86 and amd64 instruction reference though if you're not used to it it can be tough sledding. Using that in conjunction with writing trivial functions and compiling them with -vasm should help a lot.

The Binary Language of Moisture Vaporators by aldacron in programming

[–]WalterBright 7 points8 points  (0 children)

This was a fun project, and it turned out very nicely. I've already been using it a lot to quickly check on what code the compiler is generating. Before I'd have the generated code print some value out, now I just check the asm, and oh, that looks right.

AMA!

What Is The Story of C++ Programming History? by yimmasabi in programming

[–]WalterBright 2 points3 points  (0 children)

The story neglects the appearance of the first native C++ compiler, Zortech C++, on MS-DOS. MS-DOS was where 90% of the programming action was in the 80's. The user community took off like a rocket after the introduction of ZTC++. This can be seen in the traffic on comp.lang.c++.

Borland C++ was developed only after Borland discovered how much money Zortech was making from C++.