Stories
Slash Boxes
Comments

News for nerds, stuff that matters

The D Programming Language

Posted by michael on Thu Aug 16, 2001 06:57 AM
from the whiter-whites-and-brighter-colors dept.
dereferenced writes: "Walter Bright, author of the original Zortech C++ Compiler and the free (as in beer) Digital Mars C/C++ Compiler, has posted a draft specification for a new programming language that he describes as "a successor to C and C++". It seems to me that most of the "new" programming languages fall into one of two categories: Those from academia with radical new paradigms and those from large corporations with a focus on RAD and the web. Maybe its time for a new language born out of practical experience implementing compilers."

Related Stories

[+] The D Programming Language, Version 1.0 570 comments
penguinblotter writes in a journal article: "Soon, Walter Bright is scheduled to release version 1.0 of the D Programming Language. D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability. D has appeared on Slashdot a few times before, and Walter has continued to add more and more features. Most Slashdot community comments in these articles have been offered on feature X or spec Y without reading through the extensive D newsgroup archives. It has been here over the past seven years where extremely gifted and experienced programmers hashed out discussions and arrived at excellent implementations of all the ideas discussed." Read on for the rest of penguinblotter's writeup.
This discussion has been archived. No new comments can be posted.
The D Programming Language | Log In/Create an Account | Top | 530 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
  • A critique (and take a look at Ocaml) (Score:3, Interesting)

    by Chuck Messenger (320443) on Thursday August 16 2001, @07:54AM (#2110708)
    Briefly examining the specs for D, here are some thoughts which occur to me, based on my experiences with C++, Java, and a few other languages:

    o Multiple inheritance is absolutely necessary. The main way it is useful is for Java-style interfaces.

    o Getting rid of macros (preprocessor) is a very bad idea. What is needed is even more powerful macros (see Lisp).

    o Generic programming with templates is the greatest thing about C++ -- the one feature that puts C++ above other programming languages. I'd rate generic programming capability as being a "must" of any modern programming language.

    o Operator overloading is a Good Thing, in that it helps you set up a well-designed library as a "mini-language". Good programming practice involves reducing the number of keystrokes required to achieve a given result (ultimately). Generic programming, macros, and operator overloading all go in this direction. Eliminating them is a step backward.

    o You say "smart pointers are irrelevant in a garbage collected language". Not true. There are many types of resources which a destructor might free besides memory. One weakness of Java vs C++ is that it is hard to control Java's "destructors".

    The "best" programming language (for general-purpose "big" programming projects) I've encountered may be Ocaml. It can compile into native code as efficient as C++'s. It can also be interpreted. It is stronly typed. It supports a powerful "functional" programming idiom. It looks pretty good to me, although I haven't used it for anything "real" yet. But if you're looking for the "be-all, end-all" modern programming langauge, I think Ocaml's worth taking a look at.

  • 'D'? Shouldn't it be called 'P'? by Profound (Score:1) Thursday August 16 2001, @07:54AM
    • 1 reply beneath your current threshold.
  • Incorrect statements by bpyama (Score:1) Thursday August 16 2001, @10:14AM
  • Not nice thing to say by krokodil (Score:2) Thursday August 16 2001, @07:48AM
  • I hope he gets it finished by MSBob (Score:2) Thursday August 16 2001, @07:48AM
  • What I hate about C/C++ by dwlemon (Score:1) Thursday August 16 2001, @01:08PM
  • Wouldn't be "D" by ptgThug (Score:1) Thursday August 16 2001, @08:39AM
  • It's Java with more good features... by egerlach (Score:1) Thursday August 16 2001, @09:48AM
  • Good points and bad points by King Of Chat (Score:1) Thursday August 16 2001, @07:51AM
  • In, Out, and InOut parameters!! YES!!!! by whiny (Score:1) Thursday August 16 2001, @03:29PM
  • C++ and Java by Hard_Code (Score:2) Friday August 17 2001, @02:35PM
  • Did anyone RTFA before posting? by markmoss (Score:2) Friday August 17 2001, @12:57PM
  • D or P? by doghouse41 (Score:1) Thursday August 16 2001, @09:57AM
  • It's like Nick Wirth and Java had a child by MagikSlinger (Score:2) Thursday August 16 2001, @12:21PM
  • It's not B, it's P by n0ano (Score:1) Thursday August 16 2001, @10:05AM
  • Annoying compilers by Nicolas MONNET (Score:1) Thursday August 16 2001, @08:27AM
  • parallel programming by CBravo (Score:1) Thursday August 16 2001, @09:03AM
  • the successor to C is limbo by DrSkwid (Score:1) Thursday August 16 2001, @11:36AM
  • Java revisited... by Glock27 (Score:1) Thursday August 16 2001, @09:53AM
  • Putting the "Science" into "Computer Science" by dunkstr (Score:1) Thursday August 16 2001, @03:22PM
  • Why another new language ? by mguesdon (Score:1) Friday August 17 2001, @10:01AM
  • Branch prediction, etc. by Yenya (Score:1) Thursday August 16 2001, @09:27AM
  • There's been a "D". The next one should be "P" by Ungrounded Lightning (Score:2) Thursday August 16 2001, @11:36AM
  • Still no introspection by kwerle (Score:1) Thursday August 16 2001, @10:20AM
  • wah by Bongzilla (Score:1) Thursday August 16 2001, @10:12AM
  • This could be trivially compiled into C-- by ralphbecket (Score:1) Thursday August 16 2001, @08:29AM
  • I Like it by hey (Score:1) Thursday August 16 2001, @11:22AM
    • Re:I Like it by smitty_one_each (Score:1) Saturday August 25 2001, @09:23PM
  • Embedding D in HTML by linuxrunner (Score:1) Thursday August 16 2001, @09:52AM
  • Same old same old! For a change, try O'Caml by Tom7 (Score:2) Thursday August 16 2001, @10:29AM
    • 1 reply beneath your current threshold.
  • Sounds Ok but needs Interfaces... by Morocco Mole (Score:2) Thursday August 16 2001, @01:13PM
  • conservative language: java-- by jilles (Score:2) Thursday August 16 2001, @09:50AM
  • class library by Pivot (Score:1) Thursday August 16 2001, @11:41AM
  • reminds me by anshil (Score:2) Thursday August 16 2001, @08:19AM
  • D versus C# (Score:3, Informative)

    by Zeinfeld (263942) on Thursday August 16 2001, @11:47AM (#2133190) Homepage
    It would be interesting to know if the guy has contacted Microsoft. Many of the features of D are in C# and vice versa. It would be a good thing if the future of programming languages was not considered the domain of Microsoft alone (bad) or Suns lawyers alone (worse).

    Many of the features look pretty sensisble. There is now pretty unanimous support for dropping Multiple inheritance. The problem with multiple inheritance being that it leads to programs only the original authors understand.

    It is disapointing that the syntax was not changed more radically. I for one am pretty bored with typing semicolons at the end of lines. Using braces for block structure is equally tedious.

    The garbage collector is of the 'stop everything and collect' type, this is not a good scheme as anyone who has seen a PET running Microsoft Basic GC will agree. The incremental GC in .NET is a better scheme, even if it is slower overall. But that is an implementation detail.

    It would be good if people would start to look at adding support for parallel program execution. The threads programming model is very clunky and hard to use, in part because there is no means for the program to perform checks on access conflicts.

    Also a persistence model should be part of any new language. The current division between programming language and database is a lot of wasted overhead.

  • outrageous! they have stolen my name!!! by peter.koellner (Score:1) Thursday August 16 2001, @11:57AM
  • Syntax Erros in Example? by Anonymous Coward (Score:1) Thursday August 16 2001, @08:49AM
  • Microsoft will HATE it by beerandbj (Score:2) Thursday August 16 2001, @02:44PM
  • Java is annoying by mrm677 (Score:1) Thursday August 16 2001, @01:27PM
  • Garbage Collection vs. Virtual Memory (Score:3, Interesting)

    by Bryan Ischo (893) on Thursday August 16 2001, @09:40AM (#2135571) Homepage
    Something I've always wondered about Garbage Collection is, doesn't it basically add alot of VM paging overhead to a process?

    Meaning that, since the garbage collector has to periodically walk all of the heap of a process, it would seem to me that it would thus periodically force any pages that are paged to disk to be brought back in by the VM even if they didn't need to be otherwise.

    I used to do alot of Java programming, and I got the uncanny feeling that every time my program grew very large (which was very often - Java programs use *soooo* much memory, don't know if it's just a general tendency of GC or if it's Java's implementation) the system would thrash quite a bit more than if I wasn't running any Java programs ... and I came to believe that it might have something to do with the garbage collector forcing the OS to load every page of the process into memory as the GC swept through, so everything that modern OS's do in terms of trying to streamline VM kind of gets thrown out the window when garbage collectors are forcing every page of their process to be loaded in periodically.

    Just wondering why no one has ever made the point (to my knowledge, anyway) that garbage collectors may be very bad for virtual memory performance. It seems quite likely to me, anyway.

    Otherwise, I like just about every idea in the D language, especially his Name Space notion - although I didn't read too much detail of his spec, at least he's thinking about it. I hate the fact that modern languages are based on string identifiers during linking; there's no formal mechanism whatsoever of avoiding clashes in the namespace (Java's class package name idea is a small step in the right direction), and it really seems stupid to me that shared libraries should be carrying around all this string baggage, and doing all these string compares during linking ...

    Anyway, that's how I see it.

  • D's floating-point model is dangerous (Score:4, Informative)

    by fullcity (108058) on Thursday August 16 2001, @11:21AM (#2135793) Homepage
    D's philosophy about floating-point arithmetic is dangerous:
    On many computers, greater precision operations do not take any longer than lesser precision operations, so it makes numerical sense to use the greatest precision available for internal temporaries. The philosophy is not to dumb down the language to the lowest common hardware denominator, but to enable the exploitation of the best capabilities of target hardware.

    For floating point operations and expression intermediate values, a greater precision can be used than the type of the expression. Only the minimum precision is set by the types of the operands, not the maximum.

    This reflects a terrible misunderstanding of floating-point arithmetic. Decades ago, scientific programmers realized that getting a computer to "just give me the best FP answer you can come up with, I'm sure it's good enough" caused headaches. That's why we have IEEE FP standards that define EXACTLY what the results should be, to the bit.

    If you get different answers on different computers due to different roundoff errors, your software becomes unreliable. It's true!

    People get confused by Intel's 80-bit FP arithmetic. Yes, the FPU expends some effort in rounding the 80-bit result back to 64 bits, but the result is not more accurate than a 64-bit FPU. In fact the answers will be exactly the same--this is mandated by the standard.

    Anyone using floating-point arithmetic for anything serious needs to know exactly what the arithmetic model is. If Walter pursues this philosophy with his new language, he will make it unusable for numerical applications.

    Walter needs to read:

    David Goldberg, "What Every Computer Scientist Needs To Know About Floating Point Arithmetic," ACM Computing Surveys, vol. 23, pp. 5-48, 1991.

    I could not find a copy online, but here is an interview with William Kahan [berkeley.edu], the Turing award winner who co-developed the IEEE 754 floating-point standard. Language designers should notice that Kahan implicates of Java and Fortran at the end of the article.

  • Languages should be written for programmers by Synn (Score:2) Thursday August 16 2001, @09:40AM
  • here comes another war.... by 4n0nym0u$ C0w4rd (Score:1) Thursday August 16 2001, @07:51AM
    • 1 reply beneath your current threshold.
  • Why would we need another language? by shine (Score:1) Thursday August 16 2001, @07:46AM
  • General purpose language. by sentientbrendan (Score:1) Friday August 17 2001, @12:18AM
  • Replacing our chainsaws with plastic butter knives by RockyJSquirel (Score:1) Thursday August 16 2001, @09:20PM
  • Sounds like the same reasoning that lead to Java by IPFreely (Score:1) Thursday August 16 2001, @07:43AM
  • After C comes P! (Score:4, Informative)

    by vu13 (462742) on Thursday August 16 2001, @07:43AM (#2138425)
    First their was BCPL, then B, then C. Logically the next language in this family would be P.
  • can you say "Java?" (Score:5, Insightful)

    by dobratzp (155212) <dobratzp@ele.uri.edu> on Thursday August 16 2001, @07:46AM (#2138570) Homepage

    from the overview page [digitalmars.com]...

    features to keep:
    • compile/link/debug development model
    • Exception handling
    • Runtime Type Identification
    • link compatibility with the C calling conventions

    All except the last is contained in Java.

    features to drop:
    • C source code compatibility
    • Link compatibility with C++
    • Multiple inheritance
    • Templates
    • Namespaces
    • Include files
    • Creating object instances on the stack. In D, all objects are by reference.
    • Trigraphs and digraphs
    • Preprocessor
    • Operator overloading
    • Object oriented gradualism
    • Bit fields of arbitrary size
    • Support for 16 bit computers

    This seems to be precisely the parts of C++ that Java also does away with. Furthermore, the C preprocessor is not strictly part of the C language and in fact many other programming projects use cpp for simple cut and paste includes of their favorite language. When I first read about trigraphs, I couldn't wait to try them out to make some extra obfuscated [ioccc.org] code, but alas the C compiler I was using didn't support them. In fact the lack of standards compliance is one of the main drawbacks to programming in C++ and C. If my Java code compiles on sun's compiler, then I can be assured that it will also compile on any other compiler claiming to compile Java code.

    The author also mentions that D will not have any bytecodes. From a strict perspective, the Java programming language and the Java VM are two different standards and just because you typically compile Java code into (confusingly named) Java byte codes, doesn't mean you can't use one without the other. For example, anyone (who is insane) can pick up a copy of the Java Virtual Machine Specification [sun.com] and a hex editor and make some syntactiacally correct class files. More realistically though, java bytecodes are often targets for compiler construction classes. Also, if you use the GNU Java Compiler [gnu.org] you can compile programs written in the Java programming language directly into machine code.

    While 90% of the description of this language screams Java, there seem to be some of the more useful features of C++ thrown in (typedefs, scope operator, etc.). The only way for this to be successful, is to finish standardizing the language as soon as possible and get a reference compiler for it so it leaves the realm of theoretical vaporware. Perhaps Java might have looked more like this if the language design was revisited. However, Java has lots compilers [geocities.com] which are much much more likely to conform to the standard [sun.com] than the C++ equivalents [cplusplus.com].

  • Walter Bright . . . by dpinckard (Score:1) Thursday August 16 2001, @08:41AM
  • A few suggestions by bockman (Score:2) Thursday August 16 2001, @10:17AM
  • semicolons by burris (Score:2) Thursday August 16 2001, @12:00PM
    • Re:semicolons by SpryGuy (Score:1) Saturday August 18 2001, @02:21PM
  • Big deal by Pedrito (Score:2) Thursday August 16 2001, @09:33AM
    • Re:Big deal by Styros (Score:1) Thursday August 16 2001, @10:07AM
  • Where's the win? by dacron (Score:1) Thursday August 16 2001, @08:31AM
  • SECURITY BY DEFAULT by zenray (Score:2) Thursday August 16 2001, @07:49AM
  • Interesting to compare it to Java... by dwalsh (Score:1) Thursday August 16 2001, @10:17AM
  • Floating Point RelOps by vrmlguy (Score:1) Thursday August 16 2001, @10:31AM
  • Orthogonality by Bart Botma (Score:1) Thursday August 16 2001, @08:54AM
  • Maybe? (Score:3, Interesting)

    by scott1853 (194884) on Thursday August 16 2001, @07:54AM (#2154059)
    "Maybe its time for a new language born out of practical experience implementing compilers."

    Maybe it's time for a new language to be born out of practical experience writing software.

    I don't know how it is in Linux, but I really hate having to write several hundred lines of code for a single window w/controls in Window API calls. Personally, I'd like to see MS get rid of those API calls (and don't replace it with ActiveX until ActiveX works). Between the ones that don't work as documented and the rest of them being overly cumbersome, it's just a hassle. Especially when you have to create your own encapsulation objects for those things. I like Delphi because of its encapsulation of the visual components, but their base library sucks in itself in that it doesn't expose all the functionality. And since they saw that it was so important to declare everything as PRIVATE methods, you can't get descendent object to do everything you want either because you don't have access to all the base functionality.

    Simplicity shouldn't be taken to the extreme either, and gear a new language towards the non-programmer crowd like MS tries to do.

    Of course MS is just making things worse right now by implementing these new Luna APIs for XP. I'm sorry, but I don't know of anybody thats been really dying for the ability to use API calls to put a gradient on a button. In my opinion, this is just MS's attempt at trying to get developers to waste time, so they don't work that hard on developing new products that may compete with MS.
    • Re:Maybe? (Score:4, Insightful)

      by rabtech (223758) <slashdot_sez.boneville@net> on Thursday August 16 2001, @09:48AM (#2119589)
      Have you ever tried Visual Basic? I know it gets a bad rap sometimes, because it is VERY forgiving. It is extremely easy to write very crappy code that still works.

      However, for those who bother to do the job right, VB can be a very powerful tool, used to create shipping application. (As I personally have done.)

      With VB, you don't care about all the "stuff" underneath (which can be a problem when you try to do something that isn't built-in, but there are creative solutions). You just drag controls onto your window, and write the code behind them. Very easy.

      VisualStudio.NET is bringing this in two different directions: First, VB gets full access to everything, and is no longer the "bastard" child of the VS family. Secondly, the other VisualStudio languages get a new Forms system similar to VB's -- just drag controls onto the Window, set properties, then write the code to handle the events. Easy and clean.

      That's really what the entire .NET runtime is about: moving away from Win32. What is easier for using sockets to listed on Port 80? Fooling with the separate WinSock2 API, or doing "Dim mySocket as New System.Sockets.TcpListener(80)" ?
      This message sometimes gets lost because .NET is a very large umbrella. But what it is bringing to the programming side of things is very impressive indeed. An entirely new programming paradigm where everything you ever wanted to do is neatly arranged within the various Class libraries. I know that in and of itself isn't new, but having that kind of support on the OS level IS new.

      Microsoft has already stated that when the Win9x code line is pretty much dead, and everyone is writing to the CLR instead of Win32, they are going to make a move to port the CLR to the WinNT Executive (that is NT's native kernel API). Win32 will finally be relegated to "legacy" tech just like DOS interrupts and Win16.
      [ Parent ]
      • Re:Maybe? by WM_NCDESTROY (Score:1) Thursday August 16 2001, @03:09PM
      • Re:Maybe? by MagikSlinger (Score:3) Thursday August 16 2001, @11:53AM
      • Re:Maybe? by uid8472 (Score:1) Thursday August 16 2001, @02:16PM
      • Re:Maybe? by Yunzil (Score:1) Thursday August 16 2001, @10:38AM
        • Cute.. by Da VinMan (Score:1) Thursday August 16 2001, @12:27PM
        • Re:Maybe? by SpryGuy (Score:1) Saturday August 18 2001, @02:43PM
      • Re:Maybe? by Amokscience (Score:2) Thursday August 16 2001, @12:26PM
    • Re:Maybe? by avail (Score:1) Thursday August 16 2001, @09:07AM
      • Re:Maybe? by WNight (Score:2) Thursday August 16 2001, @06:00PM
    • Re:Maybe? by Lord Omlette (Score:1) Thursday August 16 2001, @08:57AM
      • Re:Maybe? by scott1853 (Score:2) Thursday August 16 2001, @09:42AM
        • Re:Maybe? by Lord Omlette (Score:1) Thursday August 16 2001, @10:14AM
          • ah by Lord Omlette (Score:1) Thursday August 16 2001, @10:36AM
        • Re:Maybe? by rossjudson (Score:1) Thursday August 16 2001, @11:03AM
          • Re:Maybe? by scott1853 (Score:1) Thursday August 16 2001, @01:15PM
        • 1 reply beneath your current threshold.
    • Re:Maybe? by Karmageddon (Score:2) Thursday August 16 2001, @08:47AM
      • Re:Maybe? by Junks Jerzey (Score:2) Thursday August 16 2001, @10:04AM
    • Re:Maybe? by SpryGuy (Score:1) Saturday August 18 2001, @02:35PM
    • 1 reply beneath your current threshold.
  • Why not completely from scratch? by Badgerman (Score:2) Thursday August 16 2001, @07:55AM
    • 1 reply beneath your current threshold.
  • D - not C compatible? by TangoCharlie (Score:1) Thursday August 16 2001, @08:21AM
  • Buggy compiler? by thejake316 (Score:1) Thursday August 16 2001, @07:59AM
  • Useful? Not Really. (Score:3, Interesting)

    by impaler (78415) <clinton@noSpaM.unknownlamer.org> on Thursday August 16 2001, @10:47AM (#2154169) Homepage
    From what the draft specs says, D doesn't look like a very good language. It ditches (arguably) useful features like multiple inheritance, templates, and operator overloading; and then it adds features like resizable, bounds checked arrays...in the language. In C++, there is a very nice resizable (optionally bounds checked using vector::at()) that is implemented in the Standard Library.

    What D will implement in the core language is really meant for the standard library. Not everyone needs resizable and bounds checked arrays (the bounds checking is the one with the real overhead). If you are coding a kernel or something low level, the overhead isn't neccesary. If I don't need to resize my arrays, I just don't #include <vector>. Simple as that.

    Also, there are no prototypes. Now, tell me, how does one get the source for a 3rd party proprietary library and read the source for the documentation? Often times, I document my code by putting a 3 or 4 line description of what the class [member|function|data type] does below its declaration in the header. If I forget what a function does, I just open the header in another frame in emacs and read its description (which has such useful information as what it uses its arguments for, what exceptions it may throw, what it returns, and whether or not it will modify an argument). It is also much easier to see what members are in a class when you can look at a simple declaration with the outline of class, instead of having to wade through 50 line members to see the next member. That just makes the class look messy, unless each function was only 1 line long.

    The lack of operator overloading also makes it harder to implement something like, say, a complex number in a library. With C++, you have the standard complex type in the standard library. If there was no operator overloading, using complex would be more difficult (which is easier: complex foo, bar; foo.i = 1; bar.r = 2; foo.add(bar); OR complex foo, bar; foo.i = 1; bar.r = 2; foo += bar;).

    I do see some good qualities. One is the ability to call a constuctor from a constructor. This results in less duplicated code, and makes it easier to keep two constructors of a class synced. Say you had a class with two constuctors: one that takes no arguments (default) and one that takes an int argument. The int argument one can't call the default constructor (this creates a temporary, contructs it, and then deletes the temporary). D allows you to do that. Maybe the next C++ specification will fix that.

    D does seem to have a lot of flaws. It doesn't seem very useful. Maybe some people will find it useful. But it seems to me to be yet another language written for someone's personal usage. It makes sense to that person, but not to anyone else. C is a good language because its creators made it useful for other people as well as themselves, same for C++, lisp, Objective-C, and countless other languages.
  • Pathetic by chris.bitmead (Score:1) Thursday August 16 2001, @08:22AM
    • 1 reply beneath your current threshold.
  • The Best Of Both Worlds? by Zarjazz (Score:1) Thursday August 16 2001, @08:05AM
    • 1 reply beneath your current threshold.
  • Take a look at Ada95 by RussP (Score:1) Thursday August 16 2001, @10:10AM
  • History by fm6 (Score:2) Friday August 17 2001, @01:48PM
  • Needs work by horse (Score:2) Thursday August 16 2001, @01:33PM
  • Convince me by Anonymous Coward (Score:2) Thursday August 16 2001, @07:02AM
    • Convince me: On (re)inventing the language wheel. by kanayo (Score:1) Thursday August 16 2001, @08:09AM
    • Re:Convince me by milleniumpoet (Score:1) Thursday August 16 2001, @12:38PM
    • Re:Convince me by kevlar (Score:1) Thursday August 16 2001, @09:39AM
    • Re:Convince me by BinxBolling (Score:1) Thursday August 16 2001, @09:38AM
    • Re:Convince me by JohnA (Score:2) Thursday August 16 2001, @07:06AM
      • Re:Convince me by melee70 (Score:1) Thursday August 16 2001, @11:52AM
      • Java speed issues (was Re:Convince me) by AJWM (Score:2) Thursday August 16 2001, @11:34AM
        • 1 reply beneath your current threshold.
      • Re:Convince me by JanneM (Score:2) Thursday August 16 2001, @07:29AM
        • Re:Convince me by PEdelman (Score:1) Thursday August 16 2001, @08:34AM
          • Re:Convince me by RevAaron (Score:2) Thursday August 16 2001, @10:29AM
        • Re:Convince me by rossjudson (Score:3) Thursday August 16 2001, @07:38AM
          • Re:Convince me by Vanders (Score:3) Thursday August 16 2001, @07:51AM
          • Re:Convince me (Score:5, Insightful)

            by IsleOfView (23825) <slashfuNO@SPAMmugfu.com> on Thursday August 16 2001, @07:48AM (#2135022) Homepage
            I'm afraid I have to disagree. I'm a pretty strong Java advocate, but I still don't feel that it's ready for desktop use because of Swing performance issues. I spoke with several of the engineers that worked on JBuilder while I was at JavaOne this year. They spent a *LOT* of time writing custom classloaders, etc. to make their GUI so snappy. JBuilder is a spectacular example of a well written Java GUI, but I don't know if it would be reasonable to say that just anybody could write something like it in 1/10 the time of some other language.

            Now on the server...that's a totally different story. I write server apps all day in Java --- my development times are SLASHED from what they would be in C/C++, or even CGI's. Maintenance and documentation are a breeze, and performance is fabulous. Java really has done great things on the server.
            [ Parent ]
          • Re:Convince me by scrytch (Score:2) Thursday August 16 2001, @12:37PM
          • Re:Convince me by Pengo (Score:1) Thursday August 16 2001, @08:33AM
          • Re:Convince me by SpryGuy (Score:1) Saturday August 18 2001, @02:56PM
          • 2 replies beneath your current threshold.
        • Re:Convince me by xtremex (Score:1) Thursday August 16 2001, @08:48AM
      • Re:Convince me by kurokaze (Score:1) Thursday August 16 2001, @07:09AM
        • Re:Convince me by IsleOfView (Score:1) Thursday August 16 2001, @07:43AM
          • 1 reply beneath your current threshold.
        • Re:Convince me by Doctor Memory (Score:1) Thursday August 16 2001, @07:42AM
          • 1 reply beneath your current threshold.
        • Re:Convince me by gavlil (Score:1) Thursday August 16 2001, @08:22AM
        • Re:Convince me by Anonymous Coward (Score:1) Thursday August 16 2001, @07:15AM
        • Re:Convince me (Score:4, Informative)

          by JohnA (131062) <johnanderson@gm[ ].com ['ail' in gap]> on Thursday August 16 2001, @07:13AM (#2158249) Homepage

          Read again. Nowhere do I compare the speed of a VM executed program to a native compiled one. Java is not the end all, be all of languages, but it is much more than the applet creation toolkit it was in 1995. Will fourier transforms ever run as fast in a VM as they do in optimized native code? Probably not. But, then again, how many of your programs are doing fourier transforms

          It's simply a right tool for the right job issue. Plain and simple

          [ Parent ]
          • Re:Convince me by chris_mahan (Score:1) Thursday August 16 2001, @11:36AM
            • Re:Convince me by Narcissus (Score:1) Thursday August 16 2001, @06:21PM
          • Re:Convince me by uid8472 (Score:2) Thursday August 16 2001, @02:19PM
          • Re:Convince me by Anonymous Coward (Score:1) Thursday August 16 2001, @07:26PM
          • Re:Convince me by Remote (Score:1) Thursday August 16 2001, @10:49AM
            • Re:Convince me by big_hairy_mama (Score:1) Thursday August 16 2001, @12:05PM
            • Re:Convince me by Axe (Score:1) Thursday August 16 2001, @06:35PM
            • 1 reply beneath your current threshold.
          • Re:Convince me by alanwj (Score:1) Thursday August 16 2001, @10:43AM
            • Re:Convince me by Karmageddon (Score:1) Thursday August 16 2001, @11:29AM
              • Re:Convince me by Bradee-oh! (Score:1) Thursday August 16 2001, @12:06PM
                • Re:Convince me by reflective recursion (Score:1) Thursday August 16 2001, @01:46PM
                • Re:Convince me by CmdrPinkTaco (Score:2) Thursday August 16 2001, @07:15PM
                • 1 reply beneath your current threshold.
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • Re:Convince me by Quietust (Score:1) Thursday August 16 2001, @08:24AM
        • Re:Convince me by 32855136 (Score:3) Thursday August 16 2001, @10:09AM
      • Re:Convince me by horse (Score:2) Thursday August 16 2001, @08:42AM
        • Re:Convince me by Paladin128 (Score:2) Thursday August 16 2001, @01:43PM
        • 1 reply beneath your current threshold.
      • 5 replies beneath your current threshold.
  • Looks cool by StrawberryFrog (Score:1) Thursday August 16 2001, @09:17AM
  • Eiffel by thebatlab (Score:1) Thursday August 16 2001, @09:39AM
    • Re:Eiffel by captredballs (Score:1) Thursday August 16 2001, @01:45PM
  • by sanermind (512885) on Thursday August 16 2001, @07:40AM (#2157829)
    It seems this guy really dosen't like c++. Now, being that he is a compiler implementor, I can certainly understand that! *grin*

    Templates and stack instantiation of of objects with semantics [i.e. constructors/destructors] is a royal pain in the a** for compiler writers. In fact, only somewhat more recently is g++ even able to handle templates in a decent way; it took a long time to get it right. C++ was a very ambitious language, hard as hell to implement, but that's what makes it so usefull. Give up templates and multiple inheirantance? He suggests this is a good thing?! D is clearly not a language innovation, he should have called it C--.

    Besides, you don't actually have to use such features extensively [or at all, really] in a C++ program. You could always avoid iostream and just #include old stdio.h, for example, only choosing to use classes with constructors for some usefull/neccessariy/labor-saving part of the code, while all the rest of it is essentially no different then C [aside from stricter compile-time type checking, which ANSI C has been moving towards anyway, lately]

    This is no innovation.

    A few other random points:
    Ohh! Garbage collection, you can link to a garbage collecting malloc in a C++ program anyway. [If you really care to look into it, C++ allows a whole range of complex underlying storage classes for custom memory management of different parts of a project.]

    Arrays are not first class objects?!
    Well, this is true, sort of. But you can choose to use vectors, [or other more efficient representations [such as maps, etc] depending on your data type, and with inlining, they will be as efficient as if they were 'native language syntax' features. You don't even have to use the STL, you can write a custom implementation of dynamicly resizable vectors of your own [with automatic bounds checking and resizing, for example] quite trivially. I did it once, and it took, what, 2 pages of source. That's the power of C++, it's so expressive for implementing custom manipulations of low level data, packaged nicely into classes.
    No on stack variables? All data as dynamic references?
    Yech. Generally too inefficient. I still suspect that he just dosen't want to tackle the hairness of writing such a complex compiler. Remember, you can use only dynamic memory in C++ easily enough, with garbage collection too.

    Overall, I think D is too lenient. I give him an F.

    Still, I strongly respect the desire to attempt to implement a novel language. Not that there aren't hundreds out there, but it's a noble effort. Still, publishing without even demo code? Yeesh.

  • Maybe not... but... by squaretorus (Score:1) Thursday August 16 2001, @07:39AM
  • this isn't progress by mj6798 (Score:1) Thursday August 16 2001, @01:44PM
  • Programmers man your stations! by slasho81 (Score:2) Thursday August 16 2001, @07:39AM
  • Interesting idea, but... by Richard Bannister (Score:1) Thursday August 16 2001, @07:38AM
    • 1 reply beneath your current threshold.
  • Here's what D can't do... by d3l3t3_m3 (Score:1) Thursday August 16 2001, @07:37AM
  • Sounds awfully lot like Object Pascal by marcovje (Score:1) Thursday August 16 2001, @08:48AM
  • Languages comparison by slasho81 (Score:2) Thursday August 16 2001, @07:33AM
  • Single inheritance by Canyon Rat (Score:1) Thursday August 16 2001, @07:29AM
  • There already is a D language by Anonymous Coward (Score:1) Thursday August 16 2001, @07:27AM
  • Sounds like... (Score:5, Interesting)

    by dmorin (25609) <dmorin@@@gmail...com> on Thursday August 16 2001, @07:27AM (#2158083) Homepage Journal
    ...just a case of a guy who knows what he doesn't like about C/C++, and has the capability to do something about it, doing it. More power to him. Hey, if it generates traditional binary executable code so the end result is independent of the D language, and it really does have the advantages he says, then what does he have to prove to anybody? Create his own little company doing D development, crank out better product faster than anybody else, and take over the world. It could happen. If he's managed to create the language that he would prefer to work in, go for it. His only problem would be getting programmers. But it's not like D would be the first proprietary language out there.

    If, on the other hand, all he wants to do is sell compilers, and therefore he needs to convince the rest of the world of the language's benefit, then fooey.

    And for the record, damn, I feel old -- I remember trying to make the Zortech compiler work for an old project of mine circa maybe 1989 or so(?) and having problems. I think at one point or another I might have actually gotten email from Walter. Wow, names from the past. In a conference call yesterday I needed to come up with a secure hashing algorithm and I said "ROT13. If we need extra security we can do it twice." and absolutely no one got it.

    Anyway, back on topic: No templates? Oooooo, I have a C++ friend who is gonna be pissed....

    duane

    "In C++, you can look at your friend's privates."

  • Nothing special... (Score:3, Informative)

    by frleong (241095) on Thursday August 16 2001, @07:25AM (#2158095)
    • Dynamic arrays - Some juicy stuff that frees the programmer from using malloc, realloc. Copied from Java or Ada or _________________ ( fill in the blank, strip out unused characters)
    • Fixing some inconsistency issues of C's syntax - some purification to make it prettier - like switch/case accepting strings, using something.size, instead of sizeof(). Nothing by itself is absolutely necessary. Syntactic sugar.
    • Unicode character support - Interesting, but usually people just got used not to embed Unicode strings in the source code. Besides, they simply renamed wchar_t to unicode just to make sure that D supports Unicode.
  • Great feature, but. . . by alnapp (Score:2) Thursday August 16 2001, @07:22AM
  • I would rather eat my E pills. by GunnarR (Score:1) Thursday August 16 2001, @07:22AM
  • Floating Point by Root Down (Score:1) Thursday August 16 2001, @07:22AM
  • Garbage collection and all that by Animats (Score:2) Thursday August 16 2001, @11:14AM
  • No templates? by Anonymous Coward (Score:2) Thursday August 16 2001, @07:18AM
  • Interesting ... by benspionage (Score:1) Thursday August 16 2001, @07:17AM
  • The only thing new is the name (Score:4, Insightful)

    by seldolivaw (179178) <meNO@SPAMseldo.com> on Thursday August 16 2001, @07:16AM (#2158236) Homepage
    It's a nice name. I like "D" as a name better than C#. But that's all. From the description of the language, it's just Java without bytecodes -- but with "the option" of bytecodes. The major things it does is throw away legacy C compatibility -- making for faster compilers that are easier to write, but not a whole lot of gain for the programmer. However, maybe it would be good to have C++ updated and throw away unnecessary features, and more structured ways of defining things (like the try-catch-finally structure instead of try-catch, which I like the idea of).
  • D already exists.. (Score:4, Informative)

    by gatkinso (15975) on Thursday August 16 2001, @07:13AM (#2158250)
    It is a scripting language for a X Window based RAD tool called Telesys(? - maybe that was the name of the company that made the software).

  • What are his motives? by deppe (Score:2) Thursday August 16 2001, @07:14AM
  • Overloading? by luckykaa (Score:1) Thursday August 16 2001, @07:12AM
  • A C/Java programmer's take by Sir Runcible Spoon (Score:1) Thursday August 16 2001, @08:44AM
  • Casting pointers to integers by p3d0 (Score:2) Thursday August 16 2001, @09:42AM
  • weirdness (Score:3, Interesting)

    by seizer (16950) on Thursday August 16 2001, @07:07AM (#2158370) Homepage
    I love the way there's a reserved word "imaginary" heh...

    He doesn't have any post-code gen optimization? I know you can perform elementary optimization onthe intermediate rep, (such as folding, etc), but he'll really need another phase if he wants to optimize for pipelines, which will vary from architecture to architecture? Tut tut. Maybe it's just an omission on his part.
    • Re:weirdness by klui (Score:1) Thursday August 16 2001, @05:36PM
    • Re:weirdness by eXtro (Score:1) Thursday August 16 2001, @08:57AM
    • 2 replies beneath your current threshold.
  • Many advantages. by Leimy (Score:1) Thursday August 16 2001, @08:43AM
  • Forth !!!! by chrysalis (Score:2) Thursday August 16 2001, @07:05AM
    • Pure FTP? by cpeterso (Score:1) Thursday August 16 2001, @03:04PM
    • Re:Forth !!!! by vernon nackulus (Score:1) Thursday August 16 2001, @11:07AM
    • Re:Forth !!!! by jotaeleemeese (Score:1) Thursday August 16 2001, @11:23AM
    • Re:Forth !!!! by markmoss (Score:2) Thursday August 16 2001, @12:50PM
      • Re:Forth !!!! by Paul Neubauer (Score:1) Thursday August 16 2001, @03:28PM
    • Re:Forth !!!! (Score:5, Funny)

      by stokes (148512) on Thursday August 16 2001, @10:53AM (#2143353)
      I've got an idea... let's hybridize a postfix language like Forth and natural language processing. We can call the new programming language "Yoda." Here's some sample code:

      Variable x to 10 be setting.
      1 to x you add.
      This times 10 you be repeating.
      [ Parent ]
      • Re:Forth !!!! (Score:4, Informative)

        by steveha (103154) on Thursday August 16 2001, @06:05PM (#2155203) Homepage
        You could extend FORTH easily to do what you describe. FORTH is very extensible. Here is FORTH code to make the first line work:

        : Variable ; IMMEDIATE
        : to SWAP ;
        : be ; IMMEDIATE
        : setting ! ;

        "Variable" and "be" do nothing and compile to nothing; they are just syntactic sugar. "to" does a SWAP so you can say "x to 10 !" rather than "10 x !". "setting" just does a ! (store) operation.

        Actually, you could make "to" and "setting" IMMEDIATE words; you would just need to make them compile in the words they implement. I'm very rusty on my FORTH, but I think you can do it this way:

        : to COMPILE SWAP ; IMMEDIATE

        Then "to" compiles a reference to SWAP, instead of creating a subroutine that calls SWAP and then returns. The IMMEDIATE version saves one subroutine call and one return.

        This would make a nice short article to publish in Dr. Dobb's or some similar magazine, right around April Fool's Day.

        I have fond memories of an April-Fools article on FORTH, describing how to add GOSUB to FORTH. He went through several versions, before finally arriving at this very efficient solution:

        : GOSUB ; IMMEDIATE

        In other words, GOSUB does nothing and compiles to nothing. FORTH is all subroutine calls anyway; it never really needed GOSUB in the first place.

        steveha

        [ Parent ]
    • Re:Forth !!!! by scrytch (Score:2) Thursday August 16 2001, @01:08PM
    • Re:Forth !!!! by mustafap (Score:1) Thursday August 16 2001, @08:07AM
    • Re:Forth !!!! by JanneM (Score:2) Thursday August 16 2001, @07:23AM
      • Re:Forth !!!! by cosmo7 (Score:1) Thursday August 16 2001, @09:17AM
      • Re:Forth !!!! by chrysalis (Score:2) Thursday August 16 2001, @07:57AM
    • 3 replies beneath your current threshold.
  • practical experience implementing compilers?? by kisrael (Score:2) Thursday August 16 2001, @07:05AM
  • First Parrot by HerrGlock (Score:2) Thursday August 16 2001, @07:04AM
    • Re:First Parrot by Anonymous Coward (Score:1) Thursday August 16 2001, @08:57AM
    • Re:First Parrot by RevAaron (Score:2) Thursday August 16 2001, @10:33AM
    • Re:First Parrot by SnarfQuest (Score:1) Thursday August 16 2001, @09:33AM
    • Re:First Parrot (Score:4, Funny)

      by JoeShmoe (90109) <askjoeshmoe@hotmail.com> on Thursday August 16 2001, @07:42AM (#2138581)
      From the dictionary:

      1. "#", ASCII code 35.

      Common names: number sign; pound; pound sign; hash; sharp; crunch; hex; mesh; grid; crosshatch; octothorpe; flash; square; pig-pen; tictactoe; scratchmark; thud; thump; splat.

      Personally, I like "C-octothorpe"

      - JoeShmoe
      [ Parent ]
      • Encore! Encore! by JoeShmoe (Score:1) Thursday August 16 2001, @09:26AM
      • Re:First Parrot by Dun Malg (Score:1) Thursday August 16 2001, @09:01AM
        • shebang by dwhite21787 (Score:1) Friday August 17 2001, @10:27AM
          • Re:shebang by dwhite21787 (Score:1) Friday August 17 2001, @10:30AM
      • Encore! by JoeShmoe (Score:2) Thursday August 16 2001, @09:36AM
        • Re:Encore! by JoeShmoe (Score:2) Thursday August 16 2001, @03:28PM
        • 1 reply beneath your current threshold.
      • 3 replies beneath your current threshold.
    • Re:First Parrot by guuyuk (Score:1) Thursday August 16 2001, @08:18AM
    • Not exactly on topic... by JEmLAC (Score:1) Thursday August 16 2001, @07:37AM
    • Re:First Parrot by jumpinin (Score:1) Thursday August 16 2001, @07:12AM
      • Re:First Parrot by FatHogByTheAss (Score:1) Thursday August 16 2001, @10:59AM
        • 1 reply beneath your current threshold.
      • 1 reply beneath your current threshold.
    • Re:First Parrot [OT] by seizer (Score:1) Thursday August 16 2001, @07:10AM
    • Re:First Parrot by doob (Score:1) Thursday August 16 2001, @07:07AM
    • 8 replies beneath your current threshold.
  • Why not Sather? by jefu (Score:1) Friday August 17 2001, @10:16AM
  • *ahem* by Lord Omlette (Score:1) Thursday August 16 2001, @08:12AM
  • Great... by segfault7375 (Score:1) Thursday August 16 2001, @08:31AM
  • Re:Problems with D as I see them by SpryGuy (Score:1) Saturday August 18 2001, @01:33PM
  • 26 replies beneath your current threshold.
(1) | 2