ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why??? You're essentially asking for an opinion...someone who loves writing in D (or python/perl/bash/C++/whatever) is going to say that's the best. Advantages and disadvantages are similarly subjective...what's good in one case isn't for another.
This sounds very much like another homework question.
Experience is something you have to get for yourself.
Have you read any of the information at the provided site, or tried to write a simple "Hello World" type program in D? If so, it would be helpful if you began by telling us your personal perspective and experience.
@OP As a beginner, you shouldn't start with an exotic language. Also I suggest avoiding extremely complicated languages (that is C++), hard-to-read languages (such as Perl), and low-level languages (e.g. C).
I actually haven't closely looked at "D." (Nor "E," "F, "G" ... I'm fairly sure that they are there.)
But, let me say this. (As someone who has actually written one.) It is easy to create "yet another language compiler." Advanced students often do this as a single-semester assignment, and – maybe – complete the project on time. Furthermore, the "code generation" by now is so-well perfected that "performance" is no longer a consideration.
Therefore, new language projects usually emerge because there is something that "many programmers need to do," such that it becomes tedious to (repetitively ...) do these things "in their individual programs." (In fact, "C++" grew out of "C" in just this way.) You can certainly say that the exact same thing has happened in "the interpreter space." (Even the massive "libraries" that have appeared in JavaScript-land.) It's all exactly the same thing.
So – "it's another tool. Different from all the others yet precisely the same. And there for exactly the same reasons. (Perl programmers like to opine that "laziness is a virtue.") When the tool you have is "not quite right," it's quite natural to invent another one.
Last edited by sundialsvcs; 12-13-2023 at 08:29 AM.
So – "it's another tool. Different from all the others yet precisely the same. And there for exactly the same reasons.
About twenty years ago, there was an idea: within a few lines [of code], anything can be easily implemented, you just have to choose the right language. If it doesn't exist, create it.
But OP have not yet answered: why do you need that opinion? What can you do with an answer, like "I hate/love it"?
What's wrong with the official page, where all the related information are collected and available?
No particular reason. My only point was that there are probably more "programming languages" out there than you can count. And some of them, like Prolog and LISP, are quite different from the others. Each one was purpose-built to address a particular [type of] problem.
For instance, "C" was created because: "we want to write an operating system (Unix®), and we don't want to have to do it in platform-specific assembler like everyone else before us had to do."
Quite recently, several new languages have appeared to address the particular concerns of "mobile apps." As this market has technically matured, along with the expectations of what "an app" is supposed to be, these "power tools" have now materialized and they work beautifully. "Cross-platform" is now quite easy to do. Equals, "it doesn't really matter anymore if your target customer has an iPhone or an Android." You can now give both of them what they want and expect, without hiring two teams of developers. (Not very long ago, that wasn't the case.)
As you observed, the "D" team had many very-specific and very-useful objectives in mind, and their very thorough web-site explains what and why they did it. This is actually very typical. When you are contemplating a brand-new project, it is extremely important that you very-carefully choose which language to write it in ... because you only get to make that decision once.
Last edited by sundialsvcs; 12-18-2023 at 08:16 AM.
An Indian software developer had once responded to my almost same original question concerning "C" ( like “should I learn C as a beginner” ) that it is all in your head. If you must program it, use whatever you have, it is of no importance. In the end, the program will only prove you right or wrong.
If you do not have other languages than 'D', then use 'D', it will probably be okay.
I had started learning 'D' to “widen my own horizons” and because I had too much time at my hands. Then I gave up because it was still too much like the other languages that I had to use, anyway. Ada is more fun, in my opinion. I ended up using Ruby and can still not give priority to any programming language.
Can we conclude that there are many answers but we do not know the question?
Last edited by Michael Uplawski; 12-15-2023 at 10:29 AM.
"Today, I would probably answer the question of "should I learn 'C' as a beginner?" with: "absolutely not."
The "C" programming language was literally invented when someone wanted to build a brand-new operating system, and they didn't want to write it in "somebody's assembler language." (Which would have relegated it to oblivion when that hardware manufacturer faded into bankruptcy, as most did.) They did it, of course, at a time when no other alternatives existed. "So, they invented one."
That was: "baby-step one." (Even though it certainly didn't feel like it, at the time ...)
Today, "C" is probably best used for creating better solutions. Even the Linux Kernel development team has begun to do that.
And this should surprise no one: "We were tool-makers then, and we are still tool-makers now."
So, "if you are a beginner," you should "stand on the shoulders of giants," as all of us now do.
At some future time,if you actually(!) care to be a "hard-core geek" (like me ...), you then might become curious as to "how the Magick was done." At which time you can simply "clone the public repository" from somewhere, and have a look.
Last edited by sundialsvcs; 12-15-2023 at 10:33 AM.
Every computer language was created because someone saw an issue that needed to be resolved in a better way (better being defined for their particular aims and purposes) and they created a tool for solving that problem as elegantly as they knew how. Some language were created to solve general software production issues, but those are (1) almost never perfect for any single specific projects, (2) often useful or even specifically designed for teaching/learning development concepts, (3) good enough.
The c programming language and family are about perfect for getting source portability and low-level performance without resorting to low level coding. This has significant value, but is less than optimal for higher level projects. It forces you to consider the sme edge cases that assembly coders should consider, but does not enforce protections, so it is easy to code vulnerabilities into project without even considering the case.
Perl was conceived as a general and non-specific text/data processing language for general use that would not PRECLUDE application to any specific project. It is not designed to be optimal in performance, but actually does quite well. No matter what other languages you started from, it was designed to take what source you generated and try to do the thing that made the best sense. Wall also intended it to be VERY general, applicable to almost any problem that might suggest grep, ksh (this was before BASH I believe), awk, sed, or a compiled language that would require longer development. (He once called it the Pathelogically Ecclectic Garbage Lister in jest, but it has also been called the coders Swiss Army Chainsaw because of its generality and power)
Pascal was designed to serve education/learning and served that purpose VERY well. It provided the power and structure of C languages with far better protections and limitations. Limitations that are somewhat bypassed in the most popular implementations because that makes them far friendlier to code.
You could write somewhat misleading, but somewhat accurate, comments like these about most languages and tools we have created. They tend to fal into families, but some defy easy categorization. (OR even sanity! Don't get a LISP coder started! Lisp is a perfect tool for some things, but might just drive you insane!)
D is a C style language designed to make coding a bit easier and avoid some of the shortcomings of C. If it is a tool that is optimal for your purpose is heavily dependent upon the nature of your project and goals. Without knowing the nature of your project and goals no one, D coder or not, will be able to tell you if it is or is not a proper tool for that use.
[Off-Topic] Someone should begin classifying programming languages as creating more or less hilarity.
[Edit] I only have use for those on top of the list.
"Perl" began because a single person didn't like the limitations of "awk." Like any good programmer of the time, he thought that he could do something better – something that would be more useful to him. So, he wrote it. He then began to share news of his new tool around – in the "Usenet newsgroups" of the time –*and somehow "it caught fire."
These days, you see quite a few new programming languages which specifically target the hardware requirements of mobile applications, which still face "hardware constraints" that most of us would now prefer to forget. These languages specifically target the evolving set of user-interface standards and expectations which "apps" have, and the fundamental need to be able to deploy a single "app" onto multiple (very different) platforms while still remaining "a single 'app.'"
When you "bury the messy details" into "the language [system ...] itself," you relieve "those who adopt your system" from the tedium (and expense(!)) of having to confront those details themselves, and [possibly|probably] getting it [however-slightly ...] wrong. And that is probably why every new language is invented. There is a reason why I "bold-faced" the word "expense."
Last edited by sundialsvcs; 12-18-2023 at 08:25 AM.
@OP I have used it, I even bought the book.
(I am a bit of a fan of esoteric computer languages)
There are some good YT video lectures on it by the inventor.
There are many great things I liked about it but I didn't push it further because it is limited to certain platforms, for instance I couldn't use it on NetBSD.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.