December 20, 2022
On Tuesday, 20 December 2022 at 08:06:49 UTC, Walter Bright wrote:
> On 12/19/2022 7:53 PM, Steven Schveighoffer wrote:
>>>      // Create an array with a capacity equal to the length of the string
>>>      auto substrings = array!string(s.length);
>> 
>> Not very correct ;)
>
> But it *looks* seductively plausible, yet has insidious errors.
>
> I predict that using AI generated code is going to result in strange problems.

Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.
December 20, 2022
On Tuesday, 20 December 2022 at 16:22:24 UTC, bachmeier wrote:
> On Tuesday, 20 December 2022 at 08:06:49 UTC, Walter Bright wrote:
>> I predict that using AI generated code is going to result in strange problems.
>
> Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.

Aka a program. :-D
Yup, that might work (most of the time).

I think Walter B.'s right.
December 20, 2022
On 12/20/2022 8:22 AM, bachmeier wrote:
> Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.

The precise description is just another programming language!
December 20, 2022
On 12/20/22 09:58, Walter Bright wrote:
> On 12/20/2022 8:22 AM, bachmeier wrote:
>> Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.
> 
> The precise description is just another programming language!

I think some of you are missing bachmeier's joke. :)

Ali

December 20, 2022
On Tue, Dec 20, 2022 at 09:58:46AM -0800, Walter Bright via Digitalmars-d wrote:
> On 12/20/2022 8:22 AM, bachmeier wrote:
> > Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.
> 
> The precise description is just another programming language!

Exactly.

And as the past several decades have shown, humans are notoriously bad at precisely describing what they want.  Probably because they themselves are unclear on what exactly it is that they really want. :-D


T

-- 
You are only young once, but you can stay immature indefinitely. -- azephrahel
December 20, 2022
On 12/20/2022 10:06 AM, Ali Çehreli wrote:
> On 12/20/22 09:58, Walter Bright wrote:
>> On 12/20/2022 8:22 AM, bachmeier wrote:
>>> Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.
>>
>> The precise description is just another programming language!
> 
> I think some of you are missing bachmeier's joke. :)

It's not necessarily a joke. I remember a product advertised heavily in the 1980s that claimed to "eliminate programming". But if you read about it more carefully, they replaced it with some sort of "specification language".

December 21, 2022
On Tuesday, 20 December 2022 at 16:22:24 UTC, bachmeier wrote:
>
> Not if you do it correctly. You just have to give the computer a precise description of everything you want it to do for you. That can be done by creating a document and feeding it to the computer for processing.

I don't want to write anything. Nuda!

I just want to say to the AI, using my *voice*:

"Write me a program that reads my text file that contains multiple lines of comma separated values and then displays those lines on the screen."

*If* the day ever arrives when a computer can do that simple request...

AI still can't get voice recognition correct - anyone remember Dragon Dictate from the 90's .. we'll, I used it then, and it got things wrong all the time, and it still does, more than 2 decades later.

Those 'insidious errors' will always be in the mix. It's a part of the natural order.
December 21, 2022

On Monday, 19 December 2022 at 08:01:47 UTC, Rumbu wrote:

>

I suppose that everybody heard about https://chat.openai.com/chat

Ask it what are the best/worst features of D. Also what needs to be improved to make D more popular. I am curious what answers it will have :)

December 21, 2022

On Wednesday, 21 December 2022 at 09:29:14 UTC, JN wrote:

>

On Monday, 19 December 2022 at 08:01:47 UTC, Rumbu wrote:

>

I suppose that everybody heard about https://chat.openai.com/chat

Ask it what are the best/worst features of D. Also what needs to be improved to make D more popular. I am curious what answers it will have :)

Regarding how to make D more popular:

There are several ways you can help make the D programming language more popular:

Use D in your projects: The best way to help promote D is to use it in your own projects and share your experiences with others. This helps showcase the language's capabilities and can encourage others to give it a try.

Share your knowledge: If you have expertise in D, consider sharing your knowledge with others through blog posts, tutorials, or speaking at conferences. This can help increase the visibility of the language and attract more users.

Contribute to the D community: The D community is made up of volunteers who contribute their time and expertise to the language. Consider getting involved in the D community by contributing to the D language specification, the D runtime, or other D-related projects.

Promote D to your colleagues: If you work with other developers, consider promoting D to your colleagues. Share your experiences with the language and encourage them to give it a try.

Attend D-related events: Consider attending D-related events, such as conferences, meetups, or workshops, to learn more about the language and connect with other D users. This can help you stay up-to-date on the latest developments in the D community and promote the language to others.

Regarding whether D is better than C++

Is D better than C++?

It's not a matter of one language being "better" than another, as different programming languages are designed to solve different kinds of problems and have different trade-offs. C++ and D are both general-purpose, statically-typed languages that can be used to write a wide variety of software, but they have some significant differences that may make one more suitable for a particular task than the other.

C++ is a high-performance language that is widely used for systems programming and is the preferred choice for many applications where efficiency is critical. It has a large and mature standard library, and it supports object-oriented, procedural, and generic programming paradigms.

D is a programming language that was designed to provide the power and flexibility of C++ with higher-level abstractions and improved memory safety. It has a modern syntax and supports many advanced features, such as garbage collection, design by contract, and unit testing. D also has a strong focus on providing efficient support for parallelism and concurrency.

Ultimately, the choice between C++ and D will depend on the specific requirements of your project and your personal preference as a programmer. It's worth considering the trade-offs and evaluating both languages to see which one is the best fit for your needs.

What are the best and worst features of D?

D is a programming language that was designed to provide the power and flexibility of C++ with higher-level abstractions and improved memory safety. Some of the best features of D include:

Strong static typing: D has a strong type system that helps catch errors early and ensures that code is correct and maintainable.

Modern syntax: D has a clean and easy-to-read syntax that is similar to other modern languages, making it easier to learn and use.

Advanced features: D supports a wide range of advanced features, including garbage collection, design by contract, and unit testing, which can help improve code quality and make it easier to write and maintain.

High performance: D is designed to be a high-performance language, with many of the same features as C++ that make it suitable for systems programming and other demanding tasks.

Good support for parallelism and concurrency: D provides strong support for parallelism and concurrency, making it easier to write programs that can take advantage of multiple processors or cores.

Some potential drawbacks of D include:

Limited adoption: D is not as widely used as some other languages, which can make it harder to find experienced D developers and libraries or frameworks that support D.

Complexity: D has a lot of advanced features and can be a complex language to learn and use, especially for those who are new to programming.

Compatibility issues: D is not fully compatible with C++, which can make it difficult to use libraries or code written in C++ with D.

Limited tooling: The D ecosystem is not as well-developed as some other languages, and there may be fewer tools and libraries available for D compared to more established languages.

December 22, 2022
I asked it to describe D from a marketing standpoint:



As a language model, I am not able to engage in marketing or advertising campaigns. However, I can provide a general overview of the D programming language.

D is a general-purpose programming language that was developed with the goal of combining the power and high performance of C and C++ with the programmer productivity of modern languages like Python and Ruby. It is a compiled, statically typed language that supports both imperative and object-oriented programming paradigms.

One of the main features of D is its support for automatic memory management, which helps to reduce the likelihood of common programming errors such as buffer overflows and null pointer exceptions. D also has a strong emphasis on simplicity and readability, with a syntax that is similar to C and C++ but designed to be more concise and easier to understand.

In addition to its native support for concurrency and parallelism, D also offers a rich standard library and a wide range of features for software development, including support for advanced data types such as associative arrays and dynamic arrays, as well as built-in support for unit testing and code generation.

Overall, the D programming language is designed to be a fast, flexible, and powerful tool for a wide range of software development tasks, from system programming to web development and beyond.



I have to say, its not a bad description! Another:



The D programming language is a modern, high-performance programming language that is designed for systems programming. It is statically-typed, has a strong focus on safety and security, and is highly expressive and flexible, making it ideal for a wide range of applications.

Some key features of the D programming language include:

- Fast compile times: The D programming language has a fast compiler that can quickly turn your code into optimized machine code.

- High performance: The D programming language has been designed with performance in mind, and is known for producing fast, efficient code that can be easily optimized for different hardware architectures.

- Strong type system: The D programming language has a strong, static type system that helps prevent many common programming errors and makes it easier to write reliable code.

- Safe and secure: The D programming language has a number of features designed to help prevent common security vulnerabilities, such as buffer overflows and null pointer exceptions.

- Cross-platform: The D programming language is designed to be portable, and can be used to develop applications for a wide range of platforms, including Windows, Linux, and macOS.

Wide range of use cases: The D programming language is suitable for a wide range of applications, including systems programming, game development, scientific computing, and more.

Overall, the D programming language is a powerful, flexible, and high-performance language that is well-suited for a wide range of programming tasks. Whether you're a seasoned developer or just starting out, the D programming language is an excellent choice for your next project.