17 ms·
D is betting hard on memory safety, and apparently system programming honestly i think, had they gone in the direction of D as a better Python, and application
by systems 9y ago
D is betting hard on memory safety, and apparently system programming
honestly i think, had they gone in the direction of D as a better Python, and application development, they would have made bigger wins (in terms of popularity) ... better tooling, better ide, refactoring, better GC, better libraries ... better faster programs
- nindalf 9y agoThe better Python market isn't an easy one to crack because its a bit crowded. Go (despite its perceived and real faults) has succeeded in this space by delivering better GC, good libraries, static typing and faster programs. Python itself is improving rapidly, for example with the addition of Type Hints. Its pretty difficult to be a better Python in 2017. The better C market, on the other hand, hasn't seen any real contender other than C++ gain traction for decades. Rust is trying now and it could get there, but its still a massive opportunity.
- pjmlp 9y agoAnd on embedded even C++ hardly managed to overtake C. https://youtu.be/D7Sd8A6_fYU https://youtu.be/D7Sd8A6_fYU
- deleted 9y ago[deleted]
- new299 9y agoI really really don't been to pile on Python... but every time I've had to interact with it I've been shocked at how slow it is compared with C or C++. I tend to write scientific code to process datasets in the range on 10Gb, for simple operations Python code can take hours as opposed to just taking minutes or seconds in C. I'm sure it's possible to write more highly optimized code in Python, but it never seems to be the case with the code bases I've worked with. With my own code (a few years ago now), I spent significant time optimizing and the final result was something that was still significantly slower than C/C++. Overall, for my work, I couldn't see an advantage. Am I just doing it wrong? Currently Go seems far more appealing to me and I've enjoyed using it (maybe I should also try Rust).
- fspeech 9y agoHave you tried Cython? That seems like a much smaller leap than a new language.
- saghm 9y agoPython is a high-level interpreted language, and C/C++ are low-level (even compared to other) compiled languages. While you might be able to optimize your Python code to run faster than it does now, it's never going to match the performance of C/C++, nor is it intended to. Go will be a significant speedup over Python, but likely won't quite match the speed of C/C++ for most tasks. Then again, the ease of development in Go will likely be noticeably better than in C or C++. Rust could potentially match the speed of C++, but it's a much more complex language than Go, so it will take some time to master. (Personally, having spent a large amount of time programming in Rust, I find myself more productive than in Go due to the powerful abstractions present in the former and lacking in the latter, but conventional wisdom is that this won't be the case for most people, and it certainly won't be when you're first learning Rust). EDIT: Anecdotally I've heard that D is a nice language, but I have no experience with it, so I can't comment on how productive it is or how fast D code will run.
- pjmlp 9y agoYou can easily get best of both worlds with Lisp derived languages.
- sythe2o0 9y agoIt's been my understanding that Lisp and its relatives aren't designed to compete against C for speed either. Is this wrong?
- pjmlp 9y agoC was designed on a PDP-11, a computer much more powerful than the mainframes where Lisp was already running since 10 years, so Lisp implementations were already quite good for most tasks by then. While C designers were trying to create UNIX at AT&T, Xerox PARC was busy creating Smalltalk, Interlisp-D and Mesa/Cedar. Other companies were creating Genera and the Connection Machine, In the end Worse is Better won, because the machines were too expensive for most pockets, normal developers could not grasp Lisp, mismanagement from those companies and UNIX was kind of cheap when comparing prices, with source code available almost for free (AT&T was prevented from selling it early on).
- saghm 9y agoAccording to their respective Wikipedia articles, D is 8 years older than Go. Given that you're saying that Go had a lot of success breaking into the Python market, why couldn't D have instead if they had put their efforts there from the beginning?
- mattnewton 9y agoI suspect a large part of go's initial success are the names attached to it, both Google and the team have great reputations. Go's continued success is a credit to the language, but maybe D has had some discoverability issues?
- vram22 9y ago>According to their respective Wikipedia articles, D is 8 years older than Go. And Go itself is some years old now (created in either 2007 or 2009 - according to its Wikipedia article - maybe they mean initial creation and first release for public use, by those two year values). So Go is about either 8 or 10 years old. And that makes D either 16 or 18 years old. >Go had a lot of success breaking into the Python market, why couldn't D have instead if they had put their efforts there from the beginning? So when D was new or just a few years old (13 to 16 years ago, say), the Python market was a lot smaller that it is today or has been for the last few years. It might not have even been a target for them, for that or any other reason - another reason could be that Walter is from a systems and compiler background, so might not have been too interested in the domain of interpreted languages (just guessing here, maybe he will comment on this). But BTW, D can be used almost like a scripting language due to its speed of compilation. See rdmd command and the "Why D?" and "D as a scripting language" articles on the Infognition blog (a google away).
- WalterBright 9y agoI've always been attracted to systems programming, and it's what I know best. Hence D is angled that way.
- vram22 9y ago
- vram22 9y ago>Go (despite its perceived and real faults) has succeeded in this space by delivering better GC, good libraries, static typing and faster programs. Also fast compilation, which D also has.
- norswap 9y agoD's objective is/was not to be popular but rather to be exactly what it is: a better low-level language. From what I can gather, it succeeded pretty well at that, lacking maybe some hype. The recent open-sourcing of the toolchain might help though.
- camus2 9y ago> D's objective is/was not to be popular but rather to be exactly what it is: a better low-level language. I don't believe that one second, every language strives to be popular and reach large adoption, since more developers == more maintainers == bigger ecosystem == more reach into enterprise.
- jacquesm 9y agoI would hold up Haskell as another counter example to your assertion.
- StevePerkins 9y agoWould you really, though? I can definitely picture some proponents taking enjoyment from their programming language being perceived as inaccessible to the masses. Insofar as it makes them feel more elite for their knowledge of it. But even then, the ego gratification depends on there being a wide audience of people who know "of" the language and its inaccessibility. If people don't know that you're elite, then well... are you? Proponents of programming languages notwithstanding though, I don't believe for a moment that the creators of any programming language do not wish for it to obtain wide adoption.
- WalterBright 9y agoYou're right. The aim for D is total world domination.
- dbaupp 9y agoWow! I think you're being extremely uncharitable to SPJ, who I believe expressed the sentiment about Haskell originally. There's ton of reasons to not wish for adoption. For instance, supporting commercial use of a programming language is a lot of effort and takes a very different shape to pure language/compiler experimentation and research: more software engineering and less computer science. It is true that the creators probably wish for the product of the research (as in, the successful ideas) to be adopted widely, but that's not the same as wishing for popularity of the framework that proved the ideas. The researchers can focus on their strengths as can commercial compiler/language developers.
- mhh__ 9y agoThe two are clearly not mutually exclusive. The standard library, IMO of course, is already structured in such a way that it can be used in a very high level way.
- Shorel 9y agoThe only difference I see is in marketing. D could be marketed as a better Python and it has enough features to qualify.
- WalterBright 9y agoThere are many D programmers who use D as a fast Python.
- anentropic 9y agowhat do people mean by 'a fast Python' in this context, when the language syntax and features look nothing like Python?
- vram22 9y agoWalter and others who know D much better can answer better, but I'll add my 2c, based on what I've read and some use I've done of D: - The Wikipedia article about D says that Python was one of the languages that influenced it: https://en.wikipedia.org/wiki/D_(programming_language) https://en.wikipedia.org/wiki/D_(programming_language) - After programming in D for a while, I noticed that a) it felt comfortable to program in it, and b) that it did feel a bit like Python, in the sense that, once you've learned some of the basic features [1] and are writing small but non-trivial programs, the language does not seem to get much in your way, as they say. Also there are a few things where its library functions are a bit like Python, like using File(filename) to open a file and get a File object to operate on. Not exactly similar syntax (though there may be some of that too, if you overlook the superficial things like braces instead of indentation to delimit blocks of code), but more of a "feel" - maybe it is the way some of the functions are designed, at a somewhat higher level of abstraction than C. Also, both Python and D were influenced by C. Incidentally, Python seems to have both influenced and been influenced by many languages (14 and 11 respectively): https://en.wikipedia.org/wiki/Python_(programming_language) https://en.wikipedia.org/wiki/Python_(programming_language) [1] I've not tried many of the advanced language features yet (and D has many language features, including some relatively advanced ones), but I found it somewhat easy to grasp even basic use of function templates. But you can do a lot even with the basic language features and standard library.
- deleted 9y ago[deleted]
- WalterBright 9y agoIronically, there are very few choices for programmers who want to write memory safe, high performance systems code. There's plenty of choice at the Python level. BetterC is a way for C programmers to gradually move to memory safety without disrupting their valuable, tested investment in working code.