digitalmars.D - A summary of D's design principles
- Andrei Alexandrescu (7/7) Sep 15 2010 A coworker asked me where he could find a brief document of D's design
- Simen kjaeraas (13/20) Sep 15 2010 I'm sure there are parts of it scattered all over digitalmars.com/d/,
- bearophile (14/26) Sep 15 2010 This reminds me a lot the Python Zen :-)
- Simen kjaeraas (4/6) Sep 15 2010 Mind giving examples to this one? I thought this was a big no-no.
- bearophile (8/9) Sep 15 2010 There are few silent differences, among them there are:
- Simen kjaeraas (9/15) Sep 15 2010 2.
- Lars T. Kyllingstad (6/26) Sep 15 2010 This can be amended by requiring that fixed-size array parameters to
- bearophile (5/10) Sep 15 2010 Sometimes I translate some C code to D, in this case I have to watch for...
- bearophile (7/9) Sep 15 2010 I think this is the relevant passage from the C Standard:
- Walter Bright (7/13) Sep 15 2010 I'm curious what bearophile is referring to, too. We've worked hard to e...
- Denis Koroskin (14/26) Sep 15 2010 Here is one of the examples (valid C/C++ and D program):
- Walter Bright (3/36) Sep 15 2010 Yes, you're right. Just disallowing the C declaration syntax in paramete...
- bearophile (4/4) Sep 15 2010 One more:
- dsimcha (13/20) Sep 15 2010 1. Thou shalt not write boilerplate code. If thou must write boilerpla...
- Don (7/20) Sep 15 2010 Here's one:
- Nick Sabalausky (6/13) Sep 15 2010 - Pragmatism
- Jesse Phillips (2/3) Sep 15 2010 I believe that is "The easy way is the safe and correct way."
- Jeff Nowakowski (3/5) Sep 15 2010 Yeah, like 3 months ago:
- Justin Johansson (6/12) Sep 16 2010 It's a honor to be cited.
- Jonathan M Davis (5/17) Sep 15 2010 One of the big ones would be that the safe way is the default but that t...
- Simen Kjaeraas (24/24) Sep 16 2010 Here's a draft of something I'd like to see. I like having the ten
- Justin Johansson (7/10) Sep 16 2010 I'm really pleased that the word "Manifesto" is gradually making
- Jeff Nowakowski (5/7) Sep 16 2010 Not to be confused with The Third Manifesto, which describes the D
- Justin Johansson (7/15) Sep 16 2010 Not at all; just an overloading of the letter D and nothing else.
- Simen kjaeraas (5/13) Sep 16 2010 So ours should be The Fourth Manifesto, then?
- bearophile (4/5) Sep 16 2010 Mars Zen :-)
- Nick Sabalausky (3/4) Sep 16 2010 Heh, I love this one :)
- Philippe Sigaud (3/9) Sep 16 2010 That's the 10 commandments in hexadecimal, from 0 to F :-)
- sybrandy (3/27) Sep 16 2010 To go along with this, perhaps "Concurrency should be easy and safe"?
- retard (32/56) Sep 17 2010 FWIW, if you're picking up one of the most used languages out there,
- Justin Johansson (5/9) Sep 17 2010 I don't think you should have even dignified the OP's
- Gary Whatmore (11/50) Sep 17 2010 Rest of the community agrees this. You fail to don't get it. D is a prag...
- Russel Winder (31/33) Sep 17 2010 On Fri, 2010-09-17 at 09:36 -0400, Gary Whatmore wrote:
- Walter Bright (12/14) Sep 17 2010 Exactly. Much of that can be summed up as D being intended for professio...
- retard (3/17) Sep 17 2010 A funny pic, somewhat related.. (language X, as seen by language Y users...
- Justin Johansson (2/19) Sep 17 2010 Excellent! Just need another row and column for D! :-)
- Bruno Medeiros (4/21) Oct 21 2010 retard, this is your best post ever! xP
- retard (3/27) Oct 21 2010 That's sad to hear -- I'm conscientiously aiming for bigger and bigger
- Justin Johansson (5/32) Oct 21 2010 Take it as a compliment as it one of the few that you will ever get on
- Justin Johansson (6/28) Oct 21 2010 Yes, it was a good post by retard.
- Bruno Medeiros (12/44) Oct 21 2010 I don't think you can have a row/column for D at this stage:
- Juanjo Alvarez (5/6) Oct 21 2010 seems
- sybrandy (5/19) Sep 17 2010 Don't forget about this:
- Russel Winder (39/55) Sep 17 2010 Java, Python, C++, Alice are the languages of teaching these days.
- Walter Bright (37/90) Sep 18 2010 Pascal was specifically designed by Wirth as a teaching language (he say...
- retard (29/90) Sep 18 2010 Yes, Pascal WAS a teaching language. However, probably there are no
- dsimcha (6/34) Sep 18 2010 Multiple paradigms are what's missing. I refuse to consider any languag...
- retard (6/41) Sep 18 2010 Right, that's a reasonable explanation. E.g. Java only supports
- Jonathan M Davis (28/69) Sep 18 2010 Except that it's not necessarily the case that one language should be us...
- Walter Bright (16/33) Sep 18 2010 I meant it as an example of a language that was designed for a purpose o...
- Jonathan M Davis (5/13) Sep 18 2010 I do! You're talking about the purposes behind the design of a language,...
- Walter Bright (2/13) Sep 18 2010 Thanks, I'm glad I wasn't being totally incomprehensible!
- Simen kjaeraas (5/7) Sep 18 2010 I'm sure I'm not the only with my palm glued to my face from the replies
- =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= (11/12) Sep 20 2010 at all.
- retard (8/9) Sep 18 2010 You SHOULD probably study the ML family of languages a bit more closely....
- Lutger (4/17) Sep 18 2010 Do you know if Alice is suited for practical programming, any experience...
- retard (6/26) Sep 18 2010 Unfortunately no, but the web site gives an impression that the
- Andrei Alexandrescu (6/32) Sep 18 2010 Then probably it's fair to not chastise Walter for not having heard of
- retard++ (1/4) Sep 18 2010 Have you ever written something significant ?
- retarded.clear() (2/8) Sep 18 2010 The douchebag has never done anything. Trolling here day and night. Does...
- Justin Johansson (9/17) Sep 19 2010 "If he had real talent, he would write code and shut up"
- Justin Johansson (19/23) Sep 19 2010 Here's a significant challenge.
- Walter Bright (2/3) Sep 18 2010 I apologize for all my numerous shortcomings!
- retard (3/7) Sep 18 2010 I'm sorry :-) But I still recommend writing couple of hundreds of lines
- JimBob (3/10) Sep 18 2010 If you wont go out of the house at least open the curtains for a bit.
- Jay Byrd (3/12) Sep 20 2010 Still? Your previous comment criticized Walter for not knowing what Alic...
- hismastersvoice (3/17) Sep 20 2010 Why don't you both cut that shit out and go play to the kindergarten? No...
- Russel Winder (41/43) Sep 20 2010 one has to study any stupid functional language, especially toys like th...
- =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= (9/10) Sep 21 2010 sity educated.
- BCS (4/11) Sep 21 2010 Heck, A spell check could do a decent translation.
- Walter Bright (3/6) Sep 18 2010 One example of C not being a particular paradigm is that it included mod...
- Juanjo Alvarez (16/18) Sep 26 2010 professional
- Walter Bright (6/19) Sep 27 2010 It's a great case history, thanks for posting this.
- Juanjo Alvarez (11/14) Sep 28 2010 everyone touts
- Jesse Phillips (2/17) Sep 28 2010 This is exactly how it should be marketed. It has the productivity of Py...
- bearophile (6/9) Sep 28 2010 Most programmers are able to see that's very false, today.
- Jesse Phillips (3/17) Sep 28 2010 I agree that much more time and work must go into it, especially a good ...
- Jonathan M Davis (21/39) Sep 28 2010 Well, there's certainly plenty of more work to be done on dmd, but it wo...
- Juanjo Alvarez (5/6) Sep 28 2010 multi-platform. But today the Web is very important, and D can't be
- dsimcha (2/8) Sep 28 2010 And metaprogramming.
- bearophile (5/6) Sep 28 2010 In C# you are able to create and compile programs at runtime.
- Jesse Phillips (3/11) Sep 28 2010 And D can do that at compile time.
- Walter Bright (4/8) Sep 28 2010 I'd be careful not to conflate C++ template metaprogramming with metapro...
- bearophile (4/7) Sep 28 2010 I meant that in modern dotnet C# the compiler is a library, you import i...
- BCS (6/20) Sep 28 2010 I think it is safe to say that the ghastly hackery needed to do MP in C+...
- retard (23/45) Sep 28 2010 I don't find it surprising that people here agree, when one is bashing
- Jonathan M Davis (21/38) Sep 28 2010 LOL. C# only acts like it's cross platform. The only operating system wi...
- Steven Schveighoffer (16/61) Sep 28 2010 How is C# higher level than D? C# is definitely a multi-platform
- Jesse Phillips (3/15) Sep 28 2010 Obviously he is following D2 for when it becomes production ready and he...
- retard (3/4) Sep 28 2010 The amount of religious stupidity never fails to impress me. I've never
- Andrei Alexandrescu (3/7) Sep 28 2010 That only begs the question :o).
- Steven Schveighoffer (9/13) Sep 29 2010 You know, people who like D come to this newsgroup for suggestions,
- retard (6/29) Sep 28 2010 FWIW, I was talking about the language, not its implementation. Does C#
- Steven Schveighoffer (9/39) Sep 29 2010 So was I. Hence my dismissing the library argument because it's not the...
- retard (12/32) Sep 29 2010 Being a higher level language isn't some positive optimum. I guess part
- Steven Schveighoffer (43/77) Sep 29 2010 Not at all, I happen to like C# pretty well too. But having programmed ...
- Sclytrack (15/19) Sep 29 2010 Compile-time custom annotation might be hard to implement. Do we really ...
- Jonathan M Davis (10/37) Sep 29 2010 Custom annotations can be very powerful and highly useful. Now, lacking ...
- Pelle (15/47) Sep 29 2010 Let me provide silly pictures. Ascii, of course.
- retard (5/48) Sep 29 2010 You're not wrong. I saw your point and liked the fact that you didn't
- Sclytrack (25/34) Sep 29 2010 C#
- Jonathan M Davis (24/59) Sep 29 2010 Except that it's not as linear as all that. Sure, C# has features that D...
- Walter Bright (9/14) Sep 29 2010 D is both higher and lower level than C#. Lower level because of:
- Don (6/25) Oct 01 2010 It's worth noting that the lowest level language is a list of hex bytes.
- Justin Johansson (9/10) Oct 01 2010 Ur no (pun intended). CGAT is the basic alphabet, implemented on
- Juanjo Alvarez (7/11) Sep 28 2010 directly
- Juanjo Alvarez (6/9) Sep 28 2010 portability to
- piotrek (25/45) Sep 28 2010 Hi,
- Jacob Carlborg (4/53) Sep 17 2010 Concurrency is currently far from easy.
- JMRyan (13/18) Sep 18 2010 Please don't call it a manifesto. A statement of design goals or design...
- Simen kjaeraas (18/29) Sep 18 2010 s =
- Jonathan M Davis (15/47) Sep 19 2010 While manifesto may be technically correct, I tend to concur with JMRyan...
- Jay Byrd (3/25) Sep 20 2010 You're simply wrong. (Not just "technically", Jonathan.)
- Jonathan M Davis (8/24) Sep 20 2010 The dictionary definition and the common usage of a word are not necessa...
- Walter Bright (6/12) Sep 17 2010 I agree, but let's be careful not to drift into trite platitudes. For ex...
- Jonathan M Davis (4/17) Sep 17 2010 And I was _so_ thinking of suggesting "write programs." ;)
- F. Almeida (5/5) Sep 17 2010 I would like such a manifesto to emphasize the following aspects that
- #ponce (3/9) Sep 17 2010 Pragmatism not religion.
- Nick B (2/5) Sep 17 2010 there is no one, true, only to be used, library. D supports diversity.
- Justin Johansson (6/12) Sep 17 2010 Using Walter's words this is a "trite platitude".
- Nick B (8/21) Sep 17 2010 Is the fact there are two libraries, and not one, or twenty, a strength,...
- Jonathan M Davis (18/45) Sep 17 2010 The fact that D has so few libraries is almost certainly temporary (not ...
- retard (11/51) Sep 17 2010 Some people value the lack of libraries quite high. In fact, if you take...
- Jay Byrd (6/35) Sep 20 2010 I gather that you are quite new to programming. Check /usr/lib on any
- retard (2/9) Sep 17 2010 Did I sense a bit of irony there?
- Nick B (2/11) Sep 17 2010 No.
- BLS (11/13) Sep 17 2010 to reduce it to the max.
- Lutger (15/26) Sep 18 2010 To me some of the most distinguishing aspects of D are:
- Justin Johansson (15/29) Sep 19 2010 I think the salient point that all miss is that D does not
- Lutger (9/34) Sep 19 2010 I don't understand this statement, there are quite a few things in D tha...
- Justin Johansson (9/43) Sep 19 2010 Some of these features you mention are very worthwhile but I mean that
- lurker (3/50) Sep 19 2010 tl;dr
- Andrei Alexandrescu (4/7) Sep 19 2010 I don't consider that piece a recommendable read for contemporary OOP
- Walter Bright (6/14) Sep 19 2010 The article was written in 1996.
- Jay Byrd (11/49) Sep 20 2010 Sorry, but "salient" is not a synonym for "false". Later you clarify by
- JMRyan (9/9) Sep 19 2010 One thing that seems to have been missed in this discussion: minimize (...
- Walter Bright (2/11) Sep 19 2010 Good points.
- Bruno Medeiros (17/25) Oct 21 2010 (recapitulating something that popped in the middle of a discussion a
- bearophile (7/11) Oct 21 2010 I suggest to judge each proposed feature on its own, instead of refusing...
- Bruno Medeiros (26/37) Oct 22 2010 I agree, and never suggested or implied otherwise!
A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. Andrei
Sep 15 2010
Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion.I'm sure there are parts of it scattered all over digitalmars.com/d/, and certainly in the newsgroup. Off the top of my head: Easy things easy, difficult things possible. Safe before fast, but fast too. If it works in C, it works the same or not at all in D. Sugar is good for you, as is salt. In moderation. Too much power is not enough. (Where are my macros?!) Programmers are lazy, so give them what they should use in the language. (unit testing, ddoc, contracts, versioning, etc...) -- Simen
Sep 15 2010
Simen kjaeraas:Easy things easy, difficult things possible. Safe before fast, but fast too. If it works in C, it works the same or not at all in D. Sugar is good for you, as is salt. In moderation. Too much power is not enough. (Where are my macros?!) Programmers are lazy, so give them what they should use in the language. (unit testing, ddoc, contracts, versioning, etc...)This reminds me a lot the Python Zen :-) Seven possible more: - It's almost good. - Practical compilers matter. - Good syntax mattes. - Memory layouts matter. - Compilation speed and reliability count. - A GC is good for you, except when you need something else. - High level when possible, low level if necessary. One of yours fixed: - If it works in C, it works (almost) the same or not at all in D. Bye, bearophile
Sep 15 2010
bearophile <bearophileHUGS lycos.com> wrote:One of yours fixed: - If it works in C, it works (almost) the same or not at all in D.Mind giving examples to this one? I thought this was a big no-no. -- Simen
Sep 15 2010
Simen kjaeraas:Mind giving examples to this one? I thought this was a big no-no.There are few silent differences, among them there are: - usage of global floating point variables/arrays that in some C programs are used without initialization, assuming they are set to zero. - fixed-sized arrays passed around by reference in C and by value in D2. See also: http://d.puremagic.com/issues/show_bug.cgi?id=4580 Bye, bearophile
Sep 15 2010
bearophile <bearophileHUGS lycos.com> wrote:Simen kjaeraas:Mind giving examples to this one? I thought this was a big no-no.There are few silent differences, among them there are: - usage of global floating point variables/arrays that in some C =programs are used without initialization, assuming they are set to zer=o.- fixed-sized arrays passed around by reference in C and by value in D=2. By Golly=C2=B9, you're right! Those certainly are worth mentioning, at least the latter. The former could be seen as bad style, but certainly something someone would do. =C2=B9) I mostly just wanted an excuse to say 'By Golly') -- = Simen
Sep 15 2010
On Wed, 15 Sep 2010 22:19:26 +0200, Simen kjaeraas wrote:bearophile <bearophileHUGS lycos.com> wrote:This can be amended by requiring that fixed-size array parameters to extern(C) functions be marked as 'ref'. See also: http://d.puremagic.com/issues/show_bug.cgi?id=3604 -LarsSimen kjaeraas:By Golly¹, you're right! Those certainly are worth mentioning, at least the latter. The former could be seen as bad style, but certainly something someone would do. ¹) I mostly just wanted an excuse to say 'By Golly')Mind giving examples to this one? I thought this was a big no-no.There are few silent differences, among them there are: - usage of global floating point variables/arrays that in some C programs are used without initialization, assuming they are set to zero. - fixed-sized arrays passed around by reference in C and by value in D2.
Sep 15 2010
Lars T. Kyllingstad:This can be amended by requiring that fixed-size array parameters to extern(C) functions be marked as 'ref'. See also: http://d.puremagic.com/issues/show_bug.cgi?id=3604Sometimes I translate some C code to D, in this case I have to watch for all the arrays, and use the ref. To solve this porting problem (and other problems) I have suggested a -cstyle: http://d.puremagic.com/issues/show_bug.cgi?id=4580 Bye, bearophile
Sep 15 2010
Simen kjaeraas:The former could be seen as bad style,I think this is the relevant passage from the C Standard: Objects with static storage duration (3.7.1) shall be zero-initialized (8.5) before any other initialization takes place. Zero-initialization and initialization with a constant expression are collectively called static initialization; all other initialization is dynamic initialization. Objects of POD [plain old data] types (3.9) with static storage duration initialized with constant expressions (5.19) shall be initialized before any dynamic initialization takes place. Objects with static storage duration defined in namespace scope in the same translation unit and dynamically initialized shall be initialized in the order in which their definition appears in the translation unit. [Note:8.5.1 describes the order in which aggregate members are initialized. The initial- ization of local static objects is described in 6.7.] So I think a C program that relies on having global floating point variables/arrays initialized to zero is formally correct.but certainly something someone would do.In one of my D programs translated from C I have had to track down a not easy to find D1 bug (see enhancement request 4580) caused by the C code assuming global floating point values set to zero (in D2 signalling NaN may help track down such bugs). Bye, bearophile
Sep 15 2010
Simen kjaeraas wrote:bearophile <bearophileHUGS lycos.com> wrote:I'm curious what bearophile is referring to, too. We've worked hard to ensure that C code either produces the same result (as defined behavior in C would) or fails to compile. And I'd add to that that the performance of C code written in D should match or exceed performance of the same code compiled with a C compiler. I'd put this under the heading of "D As A Better C".One of yours fixed: - If it works in C, it works (almost) the same or not at all in D.Mind giving examples to this one? I thought this was a big no-no.
Sep 15 2010
On Wed, 15 Sep 2010 23:36:48 +0400, Walter Bright <newshound2 digitalmars.com> wrote:Simen kjaeraas wrote:Here is one of the examples (valid C/C++ and D program): void modify(int foo[4]) { foo[0] = 42; } int main() { int foo[4]; modify(foo); return foo[0]; // returns 0 in D, 42 in C/C++ }bearophile <bearophileHUGS lycos.com> wrote:I'm curious what bearophile is referring to, too. We've worked hard to ensure that C code either produces the same result (as defined behavior in C would) or fails to compile. And I'd add to that that the performance of C code written in D should match or exceed performance of the same code compiled with a C compiler. I'd put this under the heading of "D As A Better C".One of yours fixed: - If it works in C, it works (almost) the same or not at all in D.Mind giving examples to this one? I thought this was a big no-no.
Sep 15 2010
Denis Koroskin wrote:On Wed, 15 Sep 2010 23:36:48 +0400, Walter Bright <newshound2 digitalmars.com> wrote:Yes, you're right. Just disallowing the C declaration syntax in parameters isn't good enough, because the type may be specified by a typedef/alias.Simen kjaeraas wrote:Here is one of the examples (valid C/C++ and D program): void modify(int foo[4]) { foo[0] = 42; } int main() { int foo[4]; modify(foo); return foo[0]; // returns 0 in D, 42 in C/C++ }bearophile <bearophileHUGS lycos.com> wrote:I'm curious what bearophile is referring to, too. We've worked hard to ensure that C code either produces the same result (as defined behavior in C would) or fails to compile. And I'd add to that that the performance of C code written in D should match or exceed performance of the same code compiled with a C compiler. I'd put this under the heading of "D As A Better C".One of yours fixed: - If it works in C, it works (almost) the same or not at all in D.Mind giving examples to this one? I thought this was a big no-no.
Sep 15 2010
One more: If it runs, it may probably run at compile-time too. Bye, bearophile
Sep 15 2010
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleA coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. Andrei1. Thou shalt not write boilerplate code. If thou must write boilerplate code, thy language doth not provide sufficient abstraction capabilities. 2. We're consenting adults, but we're not suicidal maniacs. Safety matters, but in the end the programmer knows best. 3. Generic solutions must be as fast as equivalent hand-coded solutions. 4. If the compiler knows it, there should be an easy way for the programmer to introspect it. 5. User defined types must have access to all features of builtin types. 6. Costly abstractions are a dime a dozen. Abstractions that can be used in performance-critical code are a real achievement. 7. Practicality beats purity. (Shamelessly stolen from Python, but perhaps even more applicable to D.)
Sep 15 2010
Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. AndreiHere's one: The machine model should map directly to the hardware of modern machines. The machine model is inherited from C, but extended with language support for hardware advances such as SIMD capabilities (in the form of array operations), precise floating point semantics, and explicitly shared memory.
Sep 15 2010
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message news:i6r1hn$2uu1$1 digitalmars.com...A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion.- Pragmatism - Make the "right" thing easy and the "wrong" thing hard. - Toolbox, not "One best tool" (In D-style, you pick the tool. In non-D style, the tool picks YOU!)
Sep 15 2010
Nick Sabalausky Wrote:- Make the "right" thing easy and the "wrong" thing hard.I believe that is "The easy way is the safe and correct way."
Sep 15 2010
On 09/15/2010 01:58 PM, Andrei Alexandrescu wrote:I know we discussed this once in the past, but couldn't find the discussion.Yeah, like 3 months ago: http://www.digitalmars.com/d/archives/digitalmars/D/The_design_principles_of_D_aka_The_D_Manifesto_111570.html
Sep 15 2010
On 16/09/2010 7:17 AM, Jeff Nowakowski wrote:On 09/15/2010 01:58 PM, Andrei Alexandrescu wrote:It's a honor to be cited. IIRC that discussion didn't go very deep at that time apart from the few expected responses. Cheers Justin JohanssonI know we discussed this once in the past, but couldn't find the discussion.Yeah, like 3 months ago: http://www.digitalmars.com/d/archives/digitalmars/D/The_design_principles_of_D_aka_The_D_Manifesto_111570.html
Sep 16 2010
On Wednesday, September 15, 2010 10:58:49 Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. AndreiOne of the big ones would be that the safe way is the default but that the unsafe way is still possible if you need it (a prime example being default initialization vs initializing with void). - Jonathan M Davis
Sep 15 2010
Here's a draft of something I'd like to see. I like having the ten == The D Manifesto == 0. Pragmatism is king. 1. Safe before all, fast before the rest. 2. High level where possible, low level where necessary. 3. If it looks like C, it works like C or never compiles. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 6. Sugar is good for you, as is salt. In moderation. 7. Too much power is almost enough. 8. User-defined types should not be treated differently. 9. What the compiler knows, the programmer can query. 10. What works at run-time, should work at compile-time. These are runner-ups that I like, but don't feel are as important as those above, says things that are already said, or just don't 'feel' right. 11. Avoid magic. 12. The tool does not pick you - you pick the tool. 13. The straight path is safe and correct. 14. The crooked path is passable. 15. We're consenting adults, not suicidal maniacs. -- Simen
Sep 16 2010
On 16/09/2010 8:34 PM, Simen Kjaeraas wrote:Here's a draft of something I'd like to see. I like having the ten == The D Manifesto ==I'm really pleased that the word "Manifesto" is gradually making its way into this ng. Let's make this a work in progress, but not too long or open-ended. Customers (i.e. potential D users) will not wait forever. Cheers Justin Johansson
Sep 16 2010
On 09/16/2010 09:51 AM, Justin Johansson wrote:I'm really pleased that the word "Manifesto" is gradually making its way into this ng.Not to be confused with The Third Manifesto, which describes the D database language. http://en.wikipedia.org/wiki/The_Third_Manifesto http://en.wikipedia.org/wiki/D_%28data_language_specification%29
Sep 16 2010
On 16/09/2010 11:24 PM, Jeff Nowakowski wrote:On 09/16/2010 09:51 AM, Justin Johansson wrote:Not at all; just an overloading of the letter D and nothing else. "Manifesto" relates to the public declaration of principals and intentions according to links found from below. Pretty much on topic and I suggest a want for a more formal creed of the D PL. http://www.google.com/search?q=define%3AmanifestoI'm really pleased that the word "Manifesto" is gradually making its way into this ng.Not to be confused with The Third Manifesto, which describes the D database language. http://en.wikipedia.org/wiki/The_Third_Manifesto http://en.wikipedia.org/wiki/D_%28data_language_specification%29
Sep 16 2010
On Thu, 16 Sep 2010 15:54:26 +0200, Jeff Nowakowski <jeff dilacero.org> wrote:On 09/16/2010 09:51 AM, Justin Johansson wrote:So ours should be The Fourth Manifesto, then? -- SimenI'm really pleased that the word "Manifesto" is gradually making its way into this ng.Not to be confused with The Third Manifesto, which describes the D database language. http://en.wikipedia.org/wiki/The_Third_Manifesto http://en.wikipedia.org/wiki/D_%28data_language_specification%29
Sep 16 2010
Simen kjaeraas:So ours should be The Fourth Manifesto, then?Mars Zen :-) Bye, bearophile
Sep 16 2010
"Simen Kjaeraas" <simen.kjaras gmail.com> wrote in message news:i6stke$o0v$1 digitalmars.com...15. We're consenting adults, not suicidal maniacs.Heh, I love this one :)
Sep 16 2010
On Thu, Sep 16, 2010 at 21:17, Nick Sabalausky <a a.a> wrote:"Simen Kjaeraas" <simen.kjaras gmail.com> wrote in message news:i6stke$o0v$1 digitalmars.com...That's the 10 commandments in hexadecimal, from 0 to F :-) That could be fun to number them as we might do it in a D program :-).15. We're consenting adults, not suicidal maniacs.Heh, I love this one :)
Sep 16 2010
On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:Here's a draft of something I'd like to see. I like having the ten == The D Manifesto == 0. Pragmatism is king. 1. Safe before all, fast before the rest. 2. High level where possible, low level where necessary. 3. If it looks like C, it works like C or never compiles. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 6. Sugar is good for you, as is salt. In moderation. 7. Too much power is almost enough. 8. User-defined types should not be treated differently. 9. What the compiler knows, the programmer can query. 10. What works at run-time, should work at compile-time. These are runner-ups that I like, but don't feel are as important as those above, says things that are already said, or just don't 'feel' right. 11. Avoid magic. 12. The tool does not pick you - you pick the tool. 13. The straight path is safe and correct. 14. The crooked path is passable. 15. We're consenting adults, not suicidal maniacs. -- SimenTo go along with this, perhaps "Concurrency should be easy and safe"? Casey
Sep 16 2010
Thu, 16 Sep 2010 21:38:24 -0400, sybrandy wrote:On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:FWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Here's a draft of something I'd like to see. I like having the tenWho wants to write impractical code outside the academia?! The concepts are way too abstract. Every member of the community has a different idea about this. Every developer should realize that some languages are toys (build by novices), some are proof-of-concept languages for research purposes, some are production ready languages for scientific (programming language) research. You're just blatantly retarded idiot if you're using these unsuitable languages for commercial work. It's not like people such as Simon Peyton Jones are complete morons -- their languages have a completely different problem domain. What I typically see here is "unlike dontlikestupid haskell, d is gooooood. haskell hate hate hate. ivory tower hate hate. aarrrgh. hate"== The D Manifesto == 0. Pragmatism is king. 13. The straight path is safe and correct. 14. The crooked path is passable.The most common priorities are: safety, performance, expressiveness, simplicity I guess: 1. means safety > performance 6. means simplicity and expressiveness are in "balance" 7. means simplicity > expressiveness 11. means simplicity > expressiveness So the priorities are safety > performance > simplicity > expressiveness Some ML based languages and maybe Scala seem to compete with D here.1. Safe before all, fast before the rest. 6. Sugar is good for you, as is salt. In moderation. 7. Too much power is almost enough. 11. Avoid magic.Most modern languages strive for these.2. High level where possible, low level where necessary. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 8. User-defined types should not be treated differently.(16) "Concurrency should be easy and safe"?The burden of C's legacy.3. If it looks like C, it works like C or never compiles.= reflection support9. What the compiler knows, the programmer can query.= metaprogramming support10. What works at run-time, should work at compile-time.D developer's IQ > 90 ?12. The tool does not pick you - you pick the tool.Some future directions for the newsgroup discussion?15. We're consenting adults, not suicidal maniacs.
Sep 17 2010
On 17/09/2010 10:14 PM, retard wrote: <cut-previous-crap/>I don't think you should have even dignified the OP's post with a response. No reply is surely a quick answer. :-)D developer's IQ> 90 ?12. The tool does not pick you - you pick the tool.Some future directions for the newsgroup discussion?15. We're consenting adults, not suicidal maniacs.
Sep 17 2010
retard Wrote:Thu, 16 Sep 2010 21:38:24 -0400, sybrandy wrote:Rest of the community agrees this. You fail to don't get it. D is a pragmatic language. We design features for pragmatic programs. * Operating systems kernels * web servers * virtual machines, and * compielers are made in D not Java! There is also no haskell OS! Won't ever coem.On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:FWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Here's a draft of something I'd like to see. I like having the tenWho wants to write impractical code outside the academia?! The concepts are way too abstract. Every member of the community has a different idea about this.== The D Manifesto == 0. Pragmatism is king. 13. The straight path is safe and correct. 14. The crooked path is passable.What I typically see here is "unlike dontlikestupid haskell, d is gooooood. haskell hate hate hate. ivory tower hate hate. aarrrgh. hate"Haskell is just stupid. Their waisting they're time! It's brainwashSo the priorities are safety > performance > simplicity > expressiveness Some ML based languages and maybe Scala seem to compete with D here.ML is crap. Its A CS 101 language for noobs. Scala runs on Java machine so its too slow and not native performance. Scala is also hard to understand!I call that utter bullshit.Most modern languages strive for these.2. High level where possible, low level where necessary. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 8. User-defined types should not be treated differently.(16) "Concurrency should be easy and safe"?D developer's IQ > 90 ?Your IQ is below zero. - G.W.
Sep 17 2010
On Fri, 2010-09-17 at 09:36 -0400, Gary Whatmore wrote: [ . . . ] I assume you are just trolling, but for the record . . .Haskell is just stupid. Their waisting they're time! It's brainwashHaskell is far from stupid. You may not like it, but saying it is stupid is in itself just stupid. [ . . . ]ML is crap. Its A CS 101 language for noobs. Scala runs on Java machine s=o its too slow and not native performance. Scala is also hard to understand= ! More nonsensical value judgements. ML is a fine language, as is OCaml. If you don't like it then fine. The issue of Java and Scala performance is not as simple as "it runs on a VM and is therefore slow". Anyone who has done any microbenchmarking or macrobenchmarking will tell you that native language have benefits in some places and VM+JIT languages have advantages in others. Blanket statements come only from people who have not investigated the situation properly -- clearly this is a blanket statement, and I have investigated it, and it remains true by inductive logic. Scala may be hard to understand for people who haven't studied it, but then so is C++, C, D, Java, Clojure, Groovy, Python, assembly language. [The rest of the email I am replying to is entirely ignorable being as it contains only value-judgement statements of no value at all.] --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Sep 17 2010
retard wrote:FWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Sep 17 2010
Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Sep 17 2010
On 18/09/2010 8:09 AM, retard wrote:Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:Excellent! Just need another row and column for D! :-)retard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Sep 17 2010
On 17/09/2010 23:39, retard wrote:Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard, this is your best post ever! xP -- Bruno Medeiros - Software Engineerretard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Oct 21 2010
Thu, 21 Oct 2010 13:13:54 +0100, Bruno Medeiros wrote:On 17/09/2010 23:39, retard wrote:That's sad to hear -- I'm conscientiously aiming for bigger and bigger disappointments :-)Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard, this is your best post ever! xPretard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Oct 21 2010
On 22/10/2010 12:26 AM, retard wrote:Thu, 21 Oct 2010 13:13:54 +0100, Bruno Medeiros wrote:Take it as a compliment as it one of the few that you will ever get on this newsgroup. Kind regards, JustinOn 17/09/2010 23:39, retard wrote:That's sad to hear -- I'm conscientiously aiming for bigger and bigger disappointments :-)Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard, this is your best post ever! xPretard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Oct 21 2010
On 21/10/2010 11:13 PM, Bruno Medeiros wrote:On 17/09/2010 23:39, retard wrote:Yes, it was a good post by retard. I remember seeing it a few weeks ago. IIRC D was not in the matrix of pictures and one wonders how the missing rows/columns for D should be rendered. :-)Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard, this is your best post ever! xPretard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Oct 21 2010
On 21/10/2010 14:28, Justin Johansson wrote:On 21/10/2010 11:13 PM, Bruno Medeiros wrote:I don't think you can have a row/column for D at this stage: * Non-D programmers are not familiar enough with D to have an opinion of it, at least in a "stereotype" sense. * And as for what D programmers think of other languages, well, it seems D attracts programmers from very varied backgrounds (C/C++, Java, scripting languages, etc.), so there would likely be wildly varied opinions about other languages. Probably the only consistent opinion would be about C/C++ (that although useful and powerful, it has immense innate shortcomings). -- Bruno Medeiros - Software EngineerOn 17/09/2010 23:39, retard wrote:Yes, it was a good post by retard. I remember seeing it a few weeks ago. IIRC D was not in the matrix of pictures and one wonders how the missing rows/columns for D should be rendered. :-)Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright wrote:retard, this is your best post ever! xPretard wrote:A funny pic, somewhat related.. (language X, as seen by language Y users) http://i.imgur.com/1gF1j.jpgFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Oct 21 2010
On Thu, 21 Oct 2010 15:26:14 +0100, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:* And as for what D programmers think of other languages, well, itseems I guess D view of C++ could be rendered as an alcoholic father while D view of C++ would be a fashion victim son.
Oct 21 2010
On 09/17/2010 05:33 PM, Walter Bright wrote:retard wrote:Don't forget about this: 10. Creating the universe (Lisp...no, wait, Perl) http://xkcd.com/224/ CaseyFWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal) 2. a research project (Haskell) 3. being focussed on solving one particular problem (Erlang) 4. designed to promote a related product (Flash) 5. designed for kids (Logo) 6. designed for non-programmers (Basic) 7. one paradigm to rule them all (Smalltalk) 8. gee, math is hard (Java) 9. implementing skynet (Lisp)
Sep 17 2010
On Fri, 2010-09-17 at 14:33 -0700, Walter Bright wrote:retard wrote:al=20FWIW, if you're picking up one of the most used languages out there,=20 their list won't differ that much:=20 Exactly. Much of that can be summed up as D being intended for profession=production use, rather than: =20 1. a teaching tool (Pascal)Java, Python, C++, Alice are the languages of teaching these days. Pascal died a death when Borland did.2. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.3. being focussed on solving one particular problem (Erlang)Yes but what a problem to have solved: running the world's telephony backbone with essentially zero downtime.4. designed to promote a related product (Flash)What's the related product?5. designed for kids (Logo)Actually this example is probably fair.6. designed for non-programmers (Basic)As was Cobol, Fortran, spreadsheets (Visicalc, etc.). There are probably more spreadhseet programs out there than any other language: counting all C, C++, D, and Java programs probably don't even get close.=207. one paradigm to rule them all (Smalltalk)Assembly language, C.8. gee, math is hard (Java)A very large majority of students study computing and computer science because they are failed mathematicians. This probably means every programming language is the way it is because maths is considered hard by the inventors.9. implementing skynet (Lisp)I wonder why Lisp gets so much flack. It is unique amongst all programming languages in that code =3D data is commutative. This makes Lisp interesting. Well perhaps not Common Lisp, but Scheme and Clojure are. I think creating lists such as this is very counter-productive as an approach to trying to promote anything. It also reflects badly on the thing being promoted. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Sep 17 2010
Russel Winder wrote:On Fri, 2010-09-17 at 14:33 -0700, Walter Bright wrote:Pascal was specifically designed by Wirth as a teaching language (he says so in his Report, I can quote it for you if you like!). Java, Python and C++ were not. I know nothing about Alice. Pascal predates Borland's Turbo Pascal by more than 10 years, and ironically it is TP that brought it back from the dead.retard wrote:Java, Python, C++, Alice are the languages of teaching these days. Pascal died a death when Borland did.FWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal)It still was designed as a research project. It even says so in the Haskell 98 report: "The committee intended that Haskell would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features." -- Haskell982. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.I didn't say it wasn't successful at solving it :-)3. being focussed on solving one particular problem (Erlang)Yes but what a problem to have solved: running the world's telephony backbone with essentially zero downtime.I believe it was to sell their (Macromedia) multimedia development environment. But if you don't like that, there's Javascript which was developed to push Netscape Navigator ahead of Explorer, and Microsoft responded with Vbscript to push Explorer.4. designed to promote a related product (Flash)What's the related product?Basic is famous in that its charter specifically was for non-programmers. Cobol was designed for managers to be able to understand the code, not to write it (a slightly different aim). Was Fortran I really developed for non-programmers, or just to make programming easier (which it was wildly successful at)? Visicalc programming wasn't specifically developed for non-programmers, it was developed as whatever was expedient and easy to implement. It was developed in 6502 assembler. You're not going to develop a sophisticated language under such a constraint.5. designed for kids (Logo)Actually this example is probably fair.6. designed for non-programmers (Basic)As was Cobol, Fortran, spreadsheets (Visicalc, etc.). There are probably more spreadhseet programs out there than any other language: counting all C, C++, D, and Java programs probably don't even get close.Assembler doesn't have a paradigm, in any case not one that it was designed around. C wasn't designed around a single paradigm, either, it was intended as a general purpose language, and was specifically not designed for any particular area of application (so says K&R). C was designed to map efficiently to the PDP-11 instruction set.7. one paradigm to rule them all (Smalltalk)Assembly language, C.I meant it as an allusion to "gee, C++ is hard". The "gee, math is hard" is an infamous quote attributed to one version of the Barbie doll that had a pull-to-talk string. Java was originally promoted as a simpler C++.8. gee, math is hard (Java)A very large majority of students study computing and computer science because they are failed mathematicians. This probably means every programming language is the way it is because maths is considered hard by the inventors.I meant it in the sense that Lisp's original use was to implement Artificial Intelligence.9. implementing skynet (Lisp)I wonder why Lisp gets so much flack. It is unique amongst all programming languages in that code = data is commutative. This makes Lisp interesting. Well perhaps not Common Lisp, but Scheme and Clojure are.I think creating lists such as this is very counter-productive as an approach to trying to promote anything. It also reflects badly on the thing being promoted.Sorry, I had hoped it was both funny and to illustrate that there are languages that are designed for purposes other than professional application programming. It's not bashing a language to say it has a purpose other than D's purpose, especially when I can quote the inventor stating such.
Sep 18 2010
Sat, 18 Sep 2010 03:44:30 -0700, Walter Bright wrote:Russel Winder wrote:Yes, Pascal WAS a teaching language. However, probably there are no colleges using it these days. Teachers have adopted more recent languages during the last 20 years and it makes no sense to compare anything to Pascal anymore. TP and Delphi both brought Pascal back to mainstream. Later an open source compiler, FPC, appeared. However, these didn't manage to bring Pascal back. It's dead. The mainstream won't start using it anymore.On Fri, 2010-09-17 at 14:33 -0700, Walter Bright wrote:Pascal was specifically designed by Wirth as a teaching language (he says so in his Report, I can quote it for you if you like!). Java, Python and C++ were not. I know nothing about Alice. Pascal predates Borland's Turbo Pascal by more than 10 years, and ironically it is TP that brought it back from the dead.retard wrote:Java, Python, C++, Alice are the languages of teaching these days. Pascal died a death when Borland did.FWIW, if you're picking up one of the most used languages out there, their list won't differ that much:Exactly. Much of that can be summed up as D being intended for professional production use, rather than: 1. a teaching tool (Pascal)Something has happened. There are few enterprises using Haskell and the GHC compiler is rather stable after years of development effort. There are also truckloads of bindings to various libraries and many libraries written in Haskell. I guess it's terribly hard to get rid of the 'ivory tower' stigma. What do you think is missing? They have: * a good compiler (more mature than dmd) * large set of libraries (more than d, seriously more than d2) * an active community (larger and more talented than d programmers) * research papers (does anyone have any idea if a single academic conference paper has ever been written about d?) * website (better than digitalmars.com) * a well defined languageIt still was designed as a research project. It even says so in the Haskell 98 report: "The committee intended that Haskell would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features." -- Haskell982. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.Netscape Navigator is dead. Vbscript is dead. Nowadays the Web 2.0 world is using IE 8, Firefox 3.6, Chrome 6, and many other standard compliant browsers. The platforms of choice today are Flash 10, Silverlight, Java 6, and Javascript. Everything else is obsolete.I believe it was to sell their (Macromedia) multimedia development environment. But if you don't like that, there's Javascript which was developed to push Netscape Navigator ahead of Explorer, and Microsoft responded with Vbscript to push Explorer.4. designed to promote a related product (Flash)What's the related product?Both Basic and Cobol are dead outside some legacy projects. It's not useful to discuss those.Basic is famous in that its charter specifically was for non-programmers. Cobol was designed for managers to be able to understand the code, not to write it (a slightly different aim).6. designed for non-programmers (Basic)As was Cobol, Fortran, spreadsheets (Visicalc, etc.). There are probably more spreadhseet programs out there than any other language: counting all C, C++, D, and Java programs probably don't even get close.The inventors of C just didn't realize it's a single paradigm language. It's a procedural imperative language, nothing more.Assembler doesn't have a paradigm, in any case not one that it was designed around. C wasn't designed around a single paradigm, either, it was intended as a general purpose language, and was specifically not designed for any particular area of application (so says K&R). C was designed to map efficiently to the PDP-11 instruction set.7. one paradigm to rule them all (Smalltalk)Assembly language, C.
Sep 18 2010
== Quote from retard (re tard.com.invalid)'s articleMultiple paradigms are what's missing. I refuse to consider any language that adheres so rigidly to a single paradigm as anything more than an ivory tower research project, no matter what. In the real world no one paradigm suits every problem, or even every small subproblem. I emphasize the small subproblem part because it implies that using multiple languages isn't they answer.Something has happened. There are few enterprises using Haskell and the GHC compiler is rather stable after years of development effort. There are also truckloads of bindings to various libraries and many libraries written in Haskell. I guess it's terribly hard to get rid of the 'ivory tower' stigma. What do you think is missing? They have: * a good compiler (more mature than dmd) * large set of libraries (more than d, seriously more than d2) * an active community (larger and more talented than d programmers) * research papers (does anyone have any idea if a single academic conference paper has ever been written about d?) * website (better than digitalmars.com) * a well defined languageIt still was designed as a research project. It even says so in the Haskell 98 report: "The committee intended that Haskell would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features." -- Haskell982. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.
Sep 18 2010
Sat, 18 Sep 2010 15:59:24 +0000, dsimcha wrote:== Quote from retard (re tard.com.invalid)'s articleRight, that's a reasonable explanation. E.g. Java only supports procedural and object-oriented programming. The frameworks and tools supplement that with metaprogramming and aspect oriented programming (all kinds of code generators such as IDEs). That seems to be enough for most developers.Multiple paradigms are what's missing. I refuse to consider any language that adheres so rigidly to a single paradigm as anything more than an ivory tower research project, no matter what. In the real world no one paradigm suits every problem, or even every small subproblem. I emphasize the small subproblem part because it implies that using multiple languages isn't they answer.Something has happened. There are few enterprises using Haskell and the GHC compiler is rather stable after years of development effort. There are also truckloads of bindings to various libraries and many libraries written in Haskell. I guess it's terribly hard to get rid of the 'ivory tower' stigma. What do you think is missing? They have: * a good compiler (more mature than dmd) * large set of libraries (more than d, seriously more than d2) * an active community (larger and more talented than d programmers) * research papers (does anyone have any idea if a single academic conference paper has ever been written about d?) * website (better than digitalmars.com) * a well defined languageIt still was designed as a research project. It even says so in the Haskell 98 report: "The committee intended that Haskell would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features." -- Haskell982. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.
Sep 18 2010
On Saturday 18 September 2010 08:59:24 dsimcha wrote:== Quote from retard (re tard.com.invalid)'s articleExcept that it's not necessarily the case that one language should be used to solve everything. I totally agree that it's generally better to have a general purpose language that supports multiple paradigms, but sometimes it's useful to use a language that's much more focused. Extreme examples of that are domain- specific languages where they can only be used in one area. I've used Haskell a fair bit, and for some types of problems, it's fantastic. For others, it's horrific. On the whole, I'd prefer to use D which is more general purpose, but that doesn't mean that I'll never use Haskell again. I prefer D to Java and C++, but odds are that I'll still end up using them if they fit the problem better for whatever reason. The reality of the matter is that it's unreasonable to expect one language to be the best language to solve every problem, no matter how good it is. Every language has its strengths and weaknesses. D is more general purpose than Haskell and therefore will be the best language for far more problems than Haskell, but doesn't mean that Haskell will never be a better choice than D for a particular problem. And of course, there's always preference. Plenty of stuff can be done just as well in multiple languages, at which point, there is no best language - it's whatever the programmer prefers to use. Ultimately, I don't see the fact that a language isn't particularly multi- paradigm to be a problem. It just means that it's not the language to use when you're not doing something where that paradigm is the best to use. And naturally, using more general purpose languages is generally a better idea, since they're more flexible. But there's plent of room for a variety of programming languages in this world, including ones which are pretty much single paradigm languages. - Jonathan M DavisMultiple paradigms are what's missing. I refuse to consider any language that adheres so rigidly to a single paradigm as anything more than an ivory tower research project, no matter what. In the real world no one paradigm suits every problem, or even every small subproblem. I emphasize the small subproblem part because it implies that using multiple languages isn't they answer.Something has happened. There are few enterprises using Haskell and the GHC compiler is rather stable after years of development effort. There are also truckloads of bindings to various libraries and many libraries written in Haskell. I guess it's terribly hard to get rid of the 'ivory tower' stigma. What do you think is missing? They have: * a good compiler (more mature than dmd) * large set of libraries (more than d, seriously more than d2) * an active community (larger and more talented than d programmers) * research papers (does anyone have any idea if a single academic conference paper has ever been written about d?) * website (better than digitalmars.com) * a well defined languageIt still was designed as a research project. It even says so in the Haskell 98 report: "The committee intended that Haskell would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features." -- Haskell982. a research project (Haskell)Haskell stopped being a research project many years ago, Haskell development now happens in companies (including Microsoft) as much as in universities and is about creating good examples of software engineering. Research languages are things like X10, Chapel, OCaml, C ++.
Sep 18 2010
retard wrote:Yes, Pascal WAS a teaching language. However, probably there are no colleges using it these days. Teachers have adopted more recent languages during the last 20 years and it makes no sense to compare anything to Pascal anymore.I meant it as an example of a language that was designed for a purpose other than what D was designed for. Sheesh!TP and Delphi both brought Pascal back to mainstream.Delphi came along long after TP, and while it is a derivative of Pascal, it is not Pascal.I guess it's terribly hard to get rid of the 'ivory tower' stigma.I didn't give it a stigma. I said it was designed as a research language - and it was. Their own designers said it was.What do you think is missing?I did not say anything was missing, nor did I criticize Haskell. I made a statement of fact.Netscape Navigator is dead. Vbscript is dead. Nowadays the Web 2.0 world is using IE 8, Firefox 3.6, Chrome 6, and many other standard compliant browsers. The platforms of choice today are Flash 10, Silverlight, Java 6, and Javascript. Everything else is obsolete.True, but irrelevant. I mentioned these as examples whose goal was to push a related product. Want some more? PALASM, given away for free in order to get people to use Programmable Logic Arrays, and it was highly successful at doing that.True, but irrelevant to my point. I see that nobody understood my point at all.Basic is famous in that its charter specifically was for non-programmers. Cobol was designed for managers to be able to understand the code, not to write it (a slightly different aim).Both Basic and Cobol are dead outside some legacy projects.The inventors of C just didn't realize it's a single paradigm language.Meaning it was not deliberately designed as a single paradigm language. The topic I'm addressing is design goals for a language - not what the language became, evolved into, or whether it is in wide use or dead.
Sep 18 2010
On Saturday 18 September 2010 11:43:36 Walter Bright wrote:I do! You're talking about the purposes behind the design of a language, and what it was designed for. What that language has later been used for is an entirely separate issue. - Jonathan M DavisTrue, but irrelevant to my point. I see that nobody understood my point at all.Basic is famous in that its charter specifically was for non-programmers. Cobol was designed for managers to be able to understand the code, not to write it (a slightly different aim).Both Basic and Cobol are dead outside some legacy projects.
Sep 18 2010
Jonathan M Davis wrote:On Saturday 18 September 2010 11:43:36 Walter Bright wrote:Thanks, I'm glad I wasn't being totally incomprehensible!I do! You're talking about the purposes behind the design of a language, and what it was designed for. What that language has later been used for is an entirely separate issue.True, but irrelevant to my point. I see that nobody understood my point at all.Basic is famous in that its charter specifically was for non-programmers. Cobol was designed for managers to be able to understand the code, not to write it (a slightly different aim).Both Basic and Cobol are dead outside some legacy projects.
Sep 18 2010
Walter Bright <newshound2 digitalmars.com> wrote:True, but irrelevant to my point. I see that nobody understood my point at all.I'm sure I'm not the only with my palm glued to my face from the replies you got. -- Simen
Sep 18 2010
True, but irrelevant to my point. I see that nobody understood my point=at all. I am appalled at the way some people here seem unable to understand basic sentences both in this thread and others (and it's not just a question of not being native English speakers, I'm not either). I'm starting to wonder if they are not deliberately misunderstanding you to generate noise... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Sep 20 2010
Sat, 18 Sep 2010 03:44:30 -0700, Walter Bright wrote:I know nothing about Alice.You SHOULD probably study the ML family of languages a bit more closely. It feels like we're having a conversation with a dinosaur. After all, in the functional programming world, ML languages are the closest competitor of D. Why? Both try to be safe, modular, strict (= not lazy by default), functional, garbage collected, often compile to native code, and have an expressive static type system with inference. Alice is the Alice ML dialect, http://www.ps.uni-saarland.de/alice/
Sep 18 2010
retard wrote:Sat, 18 Sep 2010 03:44:30 -0700, Walter Bright wrote:Do you know if Alice is suited for practical programming, any experience? I know only that it is somewhat related to Oz which had a reasonably extensive ecosystem, but it doesn't seem to be developed anymore.I know nothing about Alice.You SHOULD probably study the ML family of languages a bit more closely. It feels like we're having a conversation with a dinosaur. After all, in the functional programming world, ML languages are the closest competitor of D. Why? Both try to be safe, modular, strict (= not lazy by default), functional, garbage collected, often compile to native code, and have an expressive static type system with inference. Alice is the Alice ML dialect, http://www.ps.uni-saarland.de/alice/
Sep 18 2010
Sat, 18 Sep 2010 18:43:45 +0200, Lutger wrote:retard wrote:Unfortunately no, but the web site gives an impression that the development has stalled few years ago. I think Alice used the Oz's runtime, but is now a separate project with a new backend. If I'd write something significant commercial code in any functional language, I mightSat, 18 Sep 2010 03:44:30 -0700, Walter Bright wrote:Do you know if Alice is suited for practical programming, any experience? I know only that it is somewhat related to Oz which had a reasonably extensive ecosystem, but it doesn't seem to be developed anymore.I know nothing about Alice.You SHOULD probably study the ML family of languages a bit more closely. It feels like we're having a conversation with a dinosaur. After all, in the functional programming world, ML languages are the closest competitor of D. Why? Both try to be safe, modular, strict (= not lazy by default), functional, garbage collected, often compile to native code, and have an expressive static type system with inference. Alice is the Alice ML dialect, http://www.ps.uni-saarland.de/alice/
Sep 18 2010
On 09/18/2010 12:31 PM, retard wrote:Sat, 18 Sep 2010 18:43:45 +0200, Lutger wrote:Then probably it's fair to not chastise Walter for not having heard of it. (FWIW I'm familiar with ML and somewhat so with OCaml, but I only vaguely knew of a language called Alice and didn't know it was related to ML.) Andreiretard wrote:Unfortunately no, but the web site gives an impression that the development has stalled few years ago. I think Alice used the Oz's runtime, but is now a separate project with a new backend. If I'd write something significant commercial code in any functional language, I mightSat, 18 Sep 2010 03:44:30 -0700, Walter Bright wrote:Do you know if Alice is suited for practical programming, any experience? I know only that it is somewhat related to Oz which had a reasonably extensive ecosystem, but it doesn't seem to be developed anymore.I know nothing about Alice.You SHOULD probably study the ML family of languages a bit more closely. It feels like we're having a conversation with a dinosaur. After all, in the functional programming world, ML languages are the closest competitor of D. Why? Both try to be safe, modular, strict (= not lazy by default), functional, garbage collected, often compile to native code, and have an expressive static type system with inference. Alice is the Alice ML dialect, http://www.ps.uni-saarland.de/alice/
Sep 18 2010
If I'd write something significant commercial code in any functional language, I mightHave you ever written something significant ?
Sep 18 2010
retard++ Wrote:The douchebag has never done anything. Trolling here day and night. Doesn't know anything about functional programming, but reads those reddit posts and comes here to boost his ego with the news about new technologies. Has no practical experience with any language. I know these kinds of losers. If he had real talent, he would write code and shut up.If I'd write something significant commercial code in any functional language, I mightHave you ever written something significant ?
Sep 18 2010
On 19/09/2010 7:41 AM, retarded.clear() wrote:retard++ Wrote:"If he had real talent, he would write code and shut up" What language do you propose the alleged "douchebag" *should* write code in? Possibly the person referred to does have real talent, he/she does actually write good code, and further he/she is an asset to this community as a devil's advocate to question where D is going or purports to go? Cheers Justin JohanssonThe douchebag has never done anything. Trolling here day and night. Doesn't know anything about functional programming, but reads those reddit posts and comes here to boost his ego with the news about new technologies. Has no practical experience with any language. I know these kinds of losers. If he had real talent, he would write code and shut up.If I'd write something significant commercial code in any functional language, I mightHave you ever written something significant ?
Sep 19 2010
On 19/09/2010 7:20 AM, retard++ wrote:Here's a significant challenge. Try implementing the XPath 2.0 XDM data model in D and see where you come unstuck. I have tried very hard to do this (in C++ and Java also) and time and time again the classical OO paradigm proves that it is incapable of solving problems relating to the modeling of complex type systems without an inordinate amount of code. In this respect D is not multi-paradigm by any means (no more than C++ or Java). D is just another way of doing the more of the same old classical OO crap as does C++ and Java and its better meta- -programming capabilities, whilst a credit to itself, don't actually help to solve these kinds of complex type systems problems either. To solve the kinds of type system modelings that I am interested in, I feel that a higher level of approach is needed beyond what languages like C++, Java and D can deliver with their incestuous view of the OO world. Cheers Justin JohanssonIf I'd write something significant commercial code in any functional language, I mightHave you ever written something significant ?
Sep 19 2010
retard wrote:It feels like we're having a conversation with a dinosaur.I apologize for all my numerous shortcomings!
Sep 18 2010
Sat, 18 Sep 2010 11:45:51 -0700, Walter Bright wrote:retard wrote:I'm sorry :-) But I still recommend writing couple of hundreds of lines of code in some ML. It's a great experience.It feels like we're having a conversation with a dinosaur.I apologize for all my numerous shortcomings!
Sep 18 2010
"retard" <re tard.com.invalid> wrote in message news:i73350$2m08$3 digitalmars.com...Sat, 18 Sep 2010 11:45:51 -0700, Walter Bright wrote:If you wont go out of the house at least open the curtains for a bit.retard wrote:I'm sorry :-) But I still recommend writing couple of hundreds of lines of code in some ML. It's a great experience.It feels like we're having a conversation with a dinosaur.I apologize for all my numerous shortcomings!
Sep 18 2010
On Sat, 18 Sep 2010 19:15:44 +0000, retard wrote:Sat, 18 Sep 2010 11:45:51 -0700, Walter Bright wrote:Still? Your previous comment criticized Walter for not knowing what Alice is -- a totally different matter. You sure do live up to your user name.retard wrote:I'm sorry :-) But I still recommend writing couple of hundreds of lines of code in some ML. It's a great experience.It feels like we're having a conversation with a dinosaur.I apologize for all my numerous shortcomings!
Sep 20 2010
Jay Byrd Wrote:On Sat, 18 Sep 2010 19:15:44 +0000, retard wrote:Why don't you both cut that shit out and go play to the kindergarten? No one has to study any stupid functional language, especially toys like that Alice. How stupid is the name anyway? Oz? Alice? WTF And stop posting one liners. Like we now latin? Not every one is university educated.Sat, 18 Sep 2010 11:45:51 -0700, Walter Bright wrote:Still? Your previous comment criticized Walter for not knowing what Alice is -- a totally different matter. You sure do live up to your user name.retard wrote:I'm sorry :-) But I still recommend writing couple of hundreds of lines of code in some ML. It's a great experience.It feels like we're having a conversation with a dinosaur.I apologize for all my numerous shortcomings!
Sep 20 2010
On Mon, 2010-09-20 at 17:29 -0400, hismastersvoice wrote: [ . . . ]Why don't you both cut that shit out and go play to the kindergarten? No =one has to study any stupid functional language, especially toys like that = Alice. How stupid is the name anyway? Oz? Alice? WTF I certainly agree with your first sentence: the standard of posting on this list by some people is getting worse than appalling. Dreadful language, nigh on offensive comments made in an off-hand and disparaging manner. Whatever happened to respect and courtesy? Sadly you then ruin it in your second sentence. Whichever language you use to program in in a day-to-day sense, learning how to program in all of Lisp, Haskell, C, Java, Python, Alice, Ruby, D, Scala, C++, OCaml, Fortran, Groovy, Prolog, etc. makes you a better programmer in the language you are using. This is not wishful thinking or a condescending "hand down" statement, there is repeatable, evidential data -- the psychology of programming folk have been doing experiments on these issues for 25 years and more, and consistently finding that knowing how to program well in multiple computational models makes you a better programmer in your language of choice. So do study functional languages even if you are programming using D, it will help your D usage. If not Alice, then Clojure, Haskell, OCaml, Scheme -- pick one, or more. Write some code in those languages, and see that it helps you think different about how to write D code. Your D programming will get better.And stop posting one liners. Like we now latin? Not every one is universi=ty educated. What I find irritating is people who do not edit the quoted reply when making their one-line response. To have pages and pages of quote to trawl through to get to the one-liner is what should not happen. Oh and being university educated doesn't mean you know (note spelling) Latin (note capitalization, the name of the language is a proper noun and hence capitalized). Yours, looking forward to a higher standard of posting by everyone, --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Sep 20 2010
hismastersvoice wrote:And stop posting one liners. Like we now latin? Not every one is univer=sity educated. "non sequitur" is in the English dictionary (Collins Cobuild 1992) so you shouldn't need to know Latin to understand the expression... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Sep 21 2010
Hello Jérôme,hismastersvoice wrote:Heck, A spell check could do a decent translation. -- ... <IXOYE><And stop posting one liners. Like we now latin? Not every one is university educated."non sequitur" is in the English dictionary (Collins Cobuild 1992) so you shouldn't need to know Latin to understand the expression...
Sep 21 2010
Walter Bright wrote:C wasn't designed around a single paradigm, either, it was intended as a general purpose language, and was specifically not designed for any particular area of application (so says K&R).One example of C not being a particular paradigm is that it included modern (for the time) structured programming constructs, but still supported goto.
Sep 18 2010
On Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright <newshound2 digitalmars.com> wrote:Exactly. Much of that can be summed up as D being intended forprofessionalproduction use, rather than:Anyway you can't ignore D's productivity. As a newcomer after one week learning and toying with D my productivity is about 70% of the one I have with Python after 8 years doing Python, and higher than the one I've with Java or C++. I've found that the compiler error messages are usually very informative, which helps, but being able to link with C libs is a boost too, compared to Python or Java where you need to write lot more than declarations. Yesterday I translated some Python code (Quixote's scgi.py) to D in a couple hours and now it runs like five times faster (before any optimization or D-ization) using 10% of the.memory. The translation was almost direct, line by line which speaks a lot about D's expresivity (I only missed something like list.remove(item)).
Sep 26 2010
Juanjo Alvarez wrote:Anyway you can't ignore D's productivity. As a newcomer after one week learning and toying with D my productivity is about 70% of the one I have with Python after 8 years doing Python, and higher than the one I've with Java or C++. I've found that the compiler error messages are usually very informative, which helps, but being able to link with C libs is a boost too, compared to Python or Java where you need to write lot more than declarations. Yesterday I translated some Python code (Quixote's scgi.py) to D in a couple hours and now it runs like five times faster (before any optimization or D-ization) using 10% of the.memory. The translation was almost direct, line by line which speaks a lot about D's expresivity (I only missed something like list.remove(item)).It's a great case history, thanks for posting this. The problem with touting D's productivity, though, is that unless a new way can be found to tout it, it will be ineffective. This is because everyone touts their language as "more productive". People just see "more productive" and their brain just skips over it without it even entering their conscious thought.
Sep 27 2010
On Mon, 27 Sep 2010 21:28:16 -0700, Walter Bright <newshound2 digitalmars.com> wrote:be found to tout it, it will be ineffective. This is becauseeveryone toutstheir language as "more productive". People just see "moreproductive" and theirbrain just skips over it without it even entering their consciousthought. Well, in this case I don't believe that D is more productive than Python in the short term (it could be in the long term for big codebases involving several developers). But it is almost as productive while smoking it in performance and resource usage. So it is more like you have the advantages of a natively compiled language without many of the drawbacks.
Sep 28 2010
Juanjo Alvarez Wrote:On Mon, 27 Sep 2010 21:28:16 -0700, Walter Bright <newshound2 digitalmars.com> wrote:This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.be found to tout it, it will be ineffective. This is becauseeveryone toutstheir language as "more productive". People just see "moreproductive" and theirbrain just skips over it without it even entering their consciousthought. Well, in this case I don't believe that D is more productive than Python in the short term (it could be in the long term for big codebases involving several developers). But it is almost as productive while smoking it in performance and resource usage. So it is more like you have the advantages of a natively compiled language without many of the drawbacks.
Sep 28 2010
Jesse Phillips:This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. today the Web is very important, and D can't be used in browers. I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point. Bye, bearophile
Sep 28 2010
bearophile Wrote:Jesse Phillips:I agree that much more time and work must go into it, especially a good working selection of libraries. But for the most part it does deliver what I described but not in all areas, e.g. web. D offers. Oh, and I need to figure out how to effectively use a GUI designer so that production is actually increased when making GUIs.This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. But today the Web is very important, and D can't be used in browers. I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point. Bye, bearophile
Sep 28 2010
On Tuesday, September 28, 2010 10:22:09 bearophile wrote:Jesse Phillips:Well, there's certainly plenty of more work to be done on dmd, but it won't take 8 - 10 more years for it reach the point where it's fully stable and feature- complete and completely reasonable for using in production code. What it really libraries and tool support. The number of libraries out there for most popular languages is enormous. D just doesn't have that (though the fact that it can call C, and to some extent C++, definitely helps). Phobos is continuing to move forward, and work on tools for D is being done, and at some point we may be closer to more established languages, but that will definitely take time, and it could very well be 8 - 10 more years before the D ecosystem is really on par with that of many popular, more established languages. But it could get there. For instance, it's taken years for python to get where it is today. But steady growth in usage has gotten it to the point where it's a major and popular language. As it stands, I think that the statements of about D's productivity are true for many tasks, but compiler bugs and the lack of libraries (much as both are improving) can really take a toll on productivity in comparison to languages which are completely stable and have lots of existing library code available. If we stick with it, though, we should get there eventually. - Jonathan M DavisThis is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. But today the Web is very important, and D can't be used in browers. I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point. Bye, bearophile
Sep 28 2010
On Tue, 28 Sep 2010 13:22:09 -0400, bearophile <bearophileHUGS lycos.com> wrote:multi-platform. But today the Web is very important, and D can't be used in browers. And performance, (most of the time) . And memory usage.
Sep 28 2010
== Quote from Juanjo Alvarez (fake fakeemail.com)'s articleOn Tue, 28 Sep 2010 13:22:09 -0400, bearophile <bearophileHUGS lycos.com> wrote:And metaprogramming.multi-platform. But today the Web is very important, and D can't be used in browers. And performance, (most of the time) . And memory usage.
Sep 28 2010
dsimcha:And metaprogramming.And if you take a look at the Google C++ style guide you see that for a representative group of programmers the metaprogramming capabilities are a negative thing :-) Bye, bearophile
Sep 28 2010
bearophile Wrote:dsimcha:And D can do that at compile time. C++ meta programming is ugly.And metaprogramming.And if you take a look at the Google C++ style guide you see that for a representative group of programmers the metaprogramming capabilities are a negative thing :-) Bye, bearophile
Sep 28 2010
bearophile wrote:Any language can do that.And if you take a look at the Google C++ style guide you see that for a representative group of programmers the metaprogramming capabilities are a negative thing :-)I'd be careful not to conflate C++ template metaprogramming with metaprogramming in general.
Sep 28 2010
Walter Bright:have a human API to build an AST and then you are able to compile and run it. The 'compiler as library' is something I have suggested for D too, and you said no. Anyway, I am not asking for this feature now. Bye, bearophileAny language can do that.
Sep 28 2010
Hello Walter,bearophile wrote:I think it is safe to say that the ghastly hackery needed to do MP in C++ is a *major* part of the reason it is banned. OTOH the other reasons might be enough to keep it out even still. -- ... <IXOYE><Any language can do that.And if you take a look at the Google C++ style guide you see that for a representative group of programmers the metaprogramming capabilities are a negative thing :-)I'd be careful not to conflate C++ template metaprogramming with metaprogramming in general.
Sep 28 2010
Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:Jesse Phillips:I don't find it surprising that people here agree, when one is bashing language than D and that means it by definition has better portability toThis is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers.I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point.D2 basically brought the number of supported libraries back to zero. It's almost like starting from scratch. Jesse Phillips wrote:This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.I keep wondering, what language has the best productivity? How is it possible that people here STILL think that a single language could solve all problems. Is Python the right choice when creating interactive browser games? Is it the right choice for iPhone? Is it good for writing filesystem drivers? Is it good for high performance computing (vs FORTRAN et al). Juanjo Alvarez wrote:As a newcomer after one week learning and toying with D my productivity is about 70% of the one I have with Python after 8 years doing Python, and higher than the one I've with Java or C++.That's pretty awesome. You have maybe 0.001% of the libraries directly available, a buggy compiler, no 64-bit support, no formal spec etc. etc. And still you get about 70% of the productivity. And people say Python is maybe the most productive general purpose language out there. That's just incredible. My guess is, when D 2.0 is finally production ready, you're at least 100 times more productive than with Python. You can write 100000 lines of code per day.
Sep 28 2010
On Tuesday 28 September 2010 12:36:32 retard wrote:Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:intended for Windows. Microsoft only likes to claim that it's cross platform. In principle, given its VM and whatnot, it really should be cross platform similar to how Java is cross platform, but it really isn't. Sure, having Mono is way better than nothing, but it's always light years behind the Windows implementation, and if you want programs to run both on Windows and on other OSes with Mono, you're going to have to use a subset of the language and give up a lot of nice stuff. D is cross platform in the same way that C++ is, the same way that _most_ you're targetting. Really, I don't see much point in touting a language as cross platform unless you're talking about Java's compile once run anywhere kind of one platform). So, it really doesn't make much sense to me to make a big deal about D being cross platform unless you're talking about how some of its constructs (like version) make it easier to deal with code for different that touting D as cross platform. - Jonathan M DavisJesse Phillips:I don't find it surprising that people here agree, when one is bashing language than D and that means it by definition has better portability toThis is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers.
Sep 28 2010
On Tue, 28 Sep 2010 15:36:32 -0400, retard <re tard.com.invalid> wrote:Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:language, and a good language. But I consider them on the same level. has runtime reflection, D has compile-time reflection. There's nothing I language's fault.Jesse Phillips:I don't find it surprising that people here agree, when one is bashing language than D and that means it by definition has better portability toThis is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers.+1 dcollections :) But on that note, most libraries in dsource are defunct anyways, and wouldn't compile on the latest D1. Someone needs to clean that attic someday. Also, D is able to use any C library with minimal effort.I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point.D2 basically brought the number of supported libraries back to zero. It's almost like starting from scratch.Jesse Phillips wrote:Bleh, this is really a personal choice I think. D is my preference when given a choice. But most of the time, I'm not given a choice...This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.I keep wondering, what language has the best productivity? How is it possible that people here STILL think that a single language could solve all problems. Is Python the right choice when creating interactive browser games? Is it the right choice for iPhone? Is it good for writing filesystem drivers? Is it good for high performance computing (vs FORTRAN et al).Juanjo Alvarez wrote:And you are still posting on this NG because...? -SteveAs a newcomer after one week learning and toying with D my productivity is about 70% of the one I have with Python after 8 years doing Python, and higher than the one I've with Java or C++.That's pretty awesome. You have maybe 0.001% of the libraries directly available, a buggy compiler, no 64-bit support, no formal spec etc. etc. And still you get about 70% of the productivity. And people say Python is maybe the most productive general purpose language out there. That's just incredible. My guess is, when D 2.0 is finally production ready, you're at least 100 times more productive than with Python. You can write 100000 lines of code per day.
Sep 28 2010
Steven Schveighoffer Wrote:On Tue, 28 Sep 2010 15:36:32 -0400, retard <re tard.com.invalid> wrote:Obviously he is following D2 for when it becomes production ready and he can be 100 times more productive then he would be in Python. Maybe he was trying to be sarcastic, but I've seen retard as one very critical of D with the desire for it to realize its goals. D has had many set backs. And has made great strides. I think the criticisms brought to the NG are usually valid, though may not may not help to resolve them. But when we start praising D it can be good to keep in mind the issues that do exist; even if only a perception by those not using the language.That's pretty awesome. You have maybe 0.001% of the libraries directly available, a buggy compiler, no 64-bit support, no formal spec etc. etc. And still you get about 70% of the productivity. And people say Python is maybe the most productive general purpose language out there. That's just incredible. My guess is, when D 2.0 is finally production ready, you're at least 100 times more productive than with Python. You can write 100000 lines of code per day.And you are still posting on this NG because...? -Steve
Sep 28 2010
Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote:And you are still posting on this NG because...?The amount of religious stupidity never fails to impress me. I've never seen a community with this badly brainwashed zealots.
Sep 28 2010
On 9/28/10 14:32 PDT, retard wrote:Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote:That only begs the question :o). AndreiAnd you are still posting on this NG because...?The amount of religious stupidity never fails to impress me. I've never seen a community with this badly brainwashed zealots.
Sep 28 2010
On Tue, 28 Sep 2010 17:32:38 -0400, retard <re tard.com.invalid> wrote:Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote:You know, people who like D come to this newsgroup for suggestions, answers, and discussion... about D! So you are surprised when people here post positive things about D? You know, you are right. We're all brainwashed, and I think you just saved us. I heard there are some other newsgroups in the alt area that have been brainwashed into thinking sex is good. I think you have the perfect skills to go set them straight. Good luck! -SteveAnd you are still posting on this NG because...?The amount of religious stupidity never fails to impress me. I've never seen a community with this badly brainwashed zealots.
Sep 29 2010
Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote:On Tue, 28 Sep 2010 15:36:32 -0400, retard <re tard.com.invalid> wrote:have access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:Jesse Phillips:I don't find it surprising that people here agree, when one is bashing language than D and that means it by definition has better portability (silverlight/moonlight).This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers.
Sep 28 2010
On Tue, 28 Sep 2010 17:38:43 -0400, retard <re tard.com.invalid> wrote:Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote:So was I. Hence my dismissing the library argument because it's not the language's fault.On Tue, 28 Sep 2010 15:36:32 -0400, retard <re tard.com.invalid> wrote:FWIW, I was talking about the language, not its implementation.Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:Jesse Phillips:I don't find it surprising that people here agree, when one is bashing language than D and that means it by definition has better portability (silverlight/moonlight).This is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers.have access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can stick to D without ever touching a pointer or inline assembler. -Steve
Sep 29 2010
Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote:On Tue, 28 Sep 2010 17:38:43 -0400, retard <re tard.com.invalid> wrote:Being a higher level language isn't some positive optimum. I guess part of the reason you disagree is that you take everything personally if someone is critical towards D. My personal opinion is that D is in many lower level language. You can find one definition here: http://en.wikipedia.org/wiki/High-level_programming_languageTue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: have access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can programs in D without ever touching a pointer or inline assembler.You know, people who like D come to this newsgroup for suggestions, answers, and discussion... about D! So you are surprised when people here post positive things about D? You know, you are right. We're all brainwashed, and I think you just saved us.The logic often goes: if (post.sender == "retard" && post.criticizes("D")) poster.sender.isWrong = true; No matter what I say, I'm always wrong. Even quotes from encyclopedias or research papers are more wrong when I share them.
Sep 29 2010
On Wed, 29 Sep 2010 07:22:08 -0400, retard <re tard.com.invalid> wrote:Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote:both, I feel both are at the same level -- I can accomplish (with proper library support) the same things in both with about the same amount of effort (probably less effort with D, but this statement is probably the which managed the initialization and testing of about 400 concurrent PCs for production, and it worked pretty darn well. So I'm not talking out of my ass here. I'm also not asserting that high-level is better than low-level. People can do ridiculous things with assembly that can beat the pants off of a the same in terms of level.On Tue, 28 Sep 2010 17:38:43 -0400, retard <re tard.com.invalid> wrote:Being a higher level language isn't some positive optimum. I guess part of the reason you disagree is that you take everything personally if someone is critical towards D.Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: have access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can programs in D without ever touching a pointer or inline assembler.My personal opinion is that D is in many lower level language. You can find one definition here: http://en.wikipedia.org/wiki/High-level_programming_languageFrom that article: "The terms high-level and low-level are inherently relative. Some decades ago, the C language, and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation, parameterised recursive functions, and data types and structures, while assembly language was considered "low-level". Many programmers today might refer to C as low-level, as it lacks a large runtime-system (no garbage collection etc.), basically supports only scalar operations, and provides direct memory addressing. It therefore readily blends with assembly language and the machine level of CPUs and microcontrollers." D does not lack a large runtime system and garbage collection. It has pretty good high-level constructs, and pretty low level constructs as well. One thing not really discussed in that wikipedia article is what if a language has *both* the lowest level constructs and the highest level constructs, how is it defined? I guess you have to define the highs or lows as overriding the other, and I feel the high-level constructs are more what define the language than the low level, since the high level constructs are what the average developer uses. You may interpret it differently, so I can respect that. If SafeD is ever properly implemented, I'm guessing it would be considered a high-level language, even by you.You missed some booleans there: post.contains("rant about brainwashing") && post.contains("comments about how the OP is an idiot") Those fields are naturally not going to elicit a positive response. Look at bearophile, every other word out of his keyboard is about Python, yet nobody gets pissed off and defensive when he compares D unfavorably to Python.You know, people who like D come to this newsgroup for suggestions, answers, and discussion... about D! So you are surprised when people here post positive things about D? You know, you are right. We're all brainwashed, and I think you just saved us.The logic often goes: if (post.sender == "retard" && post.criticizes("D")) poster.sender.isWrong = true;No matter what I say, I'm always wrong. Even quotes from encyclopedias or research papers are more wrong when I share them.I don't think it's your knowledge or lack thereof, it's your delivery. Your verbiage tends to put people on the defensive. -Steve
Sep 29 2010
nobody gets pissed off and defensive when he compares D unfavorably to Python.Compile-time custom annotation might be hard to implement. Do we really need it? Going from compile-time to runtime might not be obvious too. class MarkThis : CustomAnnotation { } class A { MarkThis("test",10) void test() { //MarkThis obj = (MarkThis) getCustomAnnotation( ... ); //at runtime //even invoke methods of the annotation. } } Method test <--linked to--> annotation MarkThis and parameters ("test", 10)No matter what I say, I'm always wrong. Even quotes from encyclopedias or research papers are more wrong when I share them.
Sep 29 2010
On Wednesday, September 29, 2010 05:39:25 Sclytrack wrote:Custom annotations can be very powerful and highly useful. Now, lacking runtime reflection, exactly how useful they'd be would differ from languages such as Java which would be in D at some point - and since adding them would likely be purely additive rather than having to make breaking changes, they could be added at pretty much any point in D's development. However, I do think that D would do a lot better to have dmd and Phobos progress quite a bit more before even considering adding such a feature. - Jonathan M Davisnobody gets pissed off and defensive when he compares D unfavorably to Python.Compile-time custom annotation might be hard to implement. Do we really need it? Going from compile-time to runtime might not be obvious too. class MarkThis : CustomAnnotation { } class A { MarkThis("test",10) void test() { //MarkThis obj = (MarkThis) getCustomAnnotation( ... ); //at runtime //even invoke methods of the annotation. } } Method test <--linked to--> annotation MarkThis and parameters ("test", 10)No matter what I say, I'm always wrong. Even quotes from encyclopedias or research papers are more wrong when I share them.
Sep 29 2010
On 09/29/2010 01:22 PM, retard wrote:Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote:Let me provide silly pictures. Ascii, of course. --- --- <-- high level | | | | | | | --- | --- <-- low level D providing lower level features may make it a lower level language, but it also might not. :-) DISCLAIMER: I am wrong.On Tue, 28 Sep 2010 17:38:43 -0400, retard<re tard.com.invalid> wrote:Being a higher level language isn't some positive optimum. I guess part of the reason you disagree is that you take everything personally if someone is critical towards D. My personal opinion is that D is in many lower level language. You can find one definition here: http://en.wikipedia.org/wiki/High-level_programming_languageTue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: have access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can programs in D without ever touching a pointer or inline assembler.I, for one, think that treating you offensively is silly and wrong. Critizising D is a good thing to do.You know, people who like D come to this newsgroup for suggestions, answers, and discussion... about D! So you are surprised when people here post positive things about D? You know, you are right. We're all brainwashed, and I think you just saved us.The logic often goes: if (post.sender == "retard"&& post.criticizes("D")) poster.sender.isWrong = true; No matter what I say, I'm always wrong. Even quotes from encyclopedias or research papers are more wrong when I share them.
Sep 29 2010
Wed, 29 Sep 2010 15:17:17 +0200, Pelle wrote:On 09/29/2010 01:22 PM, retard wrote:You're not wrong. I saw your point and liked the fact that you didn't start arguing pointlessly. The picture also illustrates what I originally had in mind. These terms aren't well defined which makes this kind of discussion rather unfruitful in the first place.Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote:Let me provide silly pictures. Ascii, of course. --- --- <-- high level | | | | | | | --- | --- <-- low level D providing lower level features may make it a lower level language, but it also might not. :-) DISCLAIMER: I am wrong.On Tue, 28 Sep 2010 17:38:43 -0400, retard<re tard.com.invalid> wrote:Being a higher level language isn't some positive optimum. I guess part of the reason you disagree is that you take everything personally if someone is critical towards D. My personal opinion is that D is in many lower level language. You can find one definition here: http://en.wikipedia.org/wiki/High-level_programming_languagehave access to inline assembler? Agreed, it doesn't provide many new high level features compared to D, but it doesn't have all the interfaces with raw metal. That makes it higher level language in my book. It's less dependent on the hardware platform.IMO D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, full useful programs in D without ever touching a pointer or inline assembler.
Sep 29 2010
--- | <---------gc Delphi| --- | | | <---------custom attributes, reflection, generic collections D | | --- | | |<--|---|------------gc, better templates, experimental purity C++ | | | --- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- | | | <-------------Assembler --- --- --- Delphi might make an excellent RAD and system programming language.--- --- <-- high level | | | | | | | --- | --- <-- low level
Sep 29 2010
On Wednesday, September 29, 2010 07:59:25 Sclytrack wrote:doesn't Delphi. Take reflection, for instance. D has compile-time reflection, which combined with templates, can be extremely powerful, but it lacks runtime the other hand, has runtime reflection, but it lacks both templates and compile-time reflection (though lacking templates, I'm not sure that compile-time reflection would do it much good). It's not an obvious case of one being higher level or superior to the other. It's simply a different set of abilities, and each of them is better in a particular area but worse in another. Personally, I tend to think about a language being high level if it is capable of high-level abstractions and doesn't force you to use the low level stuff like pointers. So, whether a language _has_ the low level stuff is irrelevant to my way of thinking. It's whether it has the high level stuff and doesn't force you to use low level stuff. D has the high level stuff (though obviously there are some types of high level features that it lacks that other languages lack, just like many of those languages lack some of the high level features that D has) and doesn't force you to use its low level stuff, so it's a high level language. That's pretty much how I look at it. The fact that it has high level capabalities makes it high level even if it has low level capabilities. But since even the terms high and low level are pretty subjective, it's not like you're ever going to get a definitive scale or definition on the matter. - Jonathan M Davis--- | <---------gc Delphi| --- | | | <---------custom attributes, reflection, generic | | collections D | | --- | | |<--|---|------------gc, better templates, experimental purity C++ | | | --- | | | | | | --- | | | | | | <-------------Assembler --- --- --- Delphi might make an excellent RAD and system programming language.--- --- <-- high level | --- --- <-- low level
Sep 29 2010
Steven Schveighoffer wrote:D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can programs in D without ever touching a pointer or inline assembler.1. direct C interface 2. inline assembler 3. pointers Higher level: 1. metaprogramming 2. support for purity, const, immutable, shared 3. CTFE
Sep 29 2010
Walter Bright wrote:Steven Schveighoffer wrote:It's worth noting that the lowest level language is a list of hex bytes. Asm only gets to that level by the 'db' pseudo-instruction; there are several constructs which it doesn't support natively. Interestingly, one of those constructs is float.infinity, which D _does_ support natively.IMO D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, full useful programs in D without ever touching a pointer or inline assembler.1. direct C interface 2. inline assembler 3. pointers Higher level: 1. metaprogramming 2. support for purity, const, immutable, shared 3. CTFE
Oct 01 2010
On 1/10/2010 9:19 PM, Don wrote:It's worth noting that the lowest level language is a list of hex bytes.Ur no (pun intended). CGAT is the basic alphabet, implemented on top of RNA . Some interesting links: http://en.wikipedia.org/wiki/Proto-Human_language http://www.impredicative.com/ur/ http://www.ncbi.nlm.nih.gov/pubmed/14631359 Cheers Justin Johansson
Oct 01 2010
On Tue, 28 Sep 2010 19:36:32 +0000 (UTC), retard <re tard.com.invalid> wrote:That's pretty awesome. You have maybe 0.001% of the librariesdirectly I have a lot more libraries in D than in Python. In C.[bla bla bla, bad sarcasms, bla bla bla] at least 100 times more productive than with Python. You can write100000lines of code per day.Productivity is not measured by lines of code written. Sometimes a better measure is lines of code removed.
Sep 28 2010
On Tue, 28 Sep 2010 19:36:32 +0000 (UTC), retard <re tard.com.invalid> wrote:language than D and that means it by definition has betterportability tomajor LOL. I've never been able to run any mildly complex application in Mono. And I've tried.
Sep 28 2010
On Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote:Jesse Phillips:Hi, The majority of software developers do what they are told to do. They can't make any independent decision regarding technology and methodology they use. anything around. But unfortunately there's no commercial support behind it. To me, D solves almost every software development problem. How? D makes almost all other programming languages not needed. I mean I DON'T what to learn another language to query database or write a simple script or transform xml to html. The problem with C++ (and C) which blocks it from achieve this goal is that it's ugly and not convenient in so many places. That's why people tried to do it easier and started to produce auxiliary technologies. With D they aren't necessary. But of course we need good library and IDE. If it was me I would fork Qt Creator and make it work with D. Unfortunately plenty of platforms slows down D development. The work is divided into too many targets. D deserves a dedicated modern processor architecture and a well designed OS ;) Cheers PiotrekThis is exactly how it should be marketed. It has the productivity of Python, other dynamic languages, with the performance and power of a natively compiled language.Most programmers are able to see that's very false, today. multi-platform. But today the Web is very important, and D can't be used in browers. I think that if D wants a chance to not die as many other C-inspired languages have done in past, Walter needs lot of perseverance and to keep slowly improving D for 8-10 more years. When D will be "good enough" maybe some people will start to use it. But the implementation of D2 is currently far from that point. Bye, bearophile
Sep 28 2010
On 2010-09-17 03:38, sybrandy wrote:On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:Concurrency is currently far from easy. -- /Jacob CarlborgHere's a draft of something I'd like to see. I like having the ten == The D Manifesto == 0. Pragmatism is king. 1. Safe before all, fast before the rest. 2. High level where possible, low level where necessary. 3. If it looks like C, it works like C or never compiles. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 6. Sugar is good for you, as is salt. In moderation. 7. Too much power is almost enough. 8. User-defined types should not be treated differently. 9. What the compiler knows, the programmer can query. 10. What works at run-time, should work at compile-time. These are runner-ups that I like, but don't feel are as important as those above, says things that are already said, or just don't 'feel' right. 11. Avoid magic. 12. The tool does not pick you - you pick the tool. 13. The straight path is safe and correct. 14. The crooked path is passable. 15. We're consenting adults, not suicidal maniacs. -- SimenTo go along with this, perhaps "Concurrency should be easy and safe"? Casey
Sep 17 2010
Concurrency is currently far from easy.Perhaps, but with D providing a message-passing API, we're certainly on our way to making it much easier. I tried Perl threading a few years ago and settled on using fork for what I needed as it was much easier. I later learned Erlang and went "Wow, this is really easy!"* Did some threading in D with some success, but seeing I can now do things almost as easy as Erlang, that just makes me happy. Granted, this doesn't solve things like being able to perform an operation on all 2048 elements in an array at the same time, but it's a step in the right direction for a lot of applications, like server development. Casey * Before you go too far, yes, I do realize that there are still ways to shoot yourself in the foot with message passing. Erlang is grant in keeping you from doing so, but in either the documentation or in a tutorial elsewhere, the Erlang sages have warned us that the path may be treacherous. I can only hope that Gandalf is with me when the balrog appears...
Sep 17 2010
On Fri, 17 Sep 2010 15:08:07 +0200, Jacob Carlborg wrote:On 2010-09-17 03:38, sybrandy wrote:Non sequitur.On 09/16/2010 07:04 AM, Simen Kjaeraas wrote:Concurrency is currently far from easy.Here's a draft of something I'd like to see. I like having the ten == The D Manifesto == 0. Pragmatism is king. 1. Safe before all, fast before the rest. 2. High level where possible, low level where necessary. 3. If it looks like C, it works like C or never compiles. 4. Easy things easy, difficult things possible. 5. Thou shalt not need to write boilerplate code. 6. Sugar is good for you, as is salt. In moderation. 7. Too much power is almost enough. 8. User-defined types should not be treated differently. 9. What the compiler knows, the programmer can query. 10. What works at run-time, should work at compile-time. These are runner-ups that I like, but don't feel are as important as those above, says things that are already said, or just don't 'feel' right. 11. Avoid magic. 12. The tool does not pick you - you pick the tool. 13. The straight path is safe and correct. 14. The crooked path is passable. 15. We're consenting adults, not suicidal maniacs. -- SimenTo go along with this, perhaps "Concurrency should be easy and safe"? Casey
Sep 20 2010
Simen Kjaeraas <simen.kjaras gmail.com> wrote in news:i6stke$o0v$1 digitalmars.com:Here's a draft of something I'd like to see. I like having the ten == The D Manifesto ==Please don't call it a manifesto. A statement of design goals or design principles says, "This is what we want to do." A manifesto says, "This is what everybody should want to do. This is exactly why the Date/Darwen manifesto choose that word. D is a good language. (I am forced to use Visual dBase in my day job, so I find D to be a really, Really, REALLY good language). There are other good languages out there. There is no reason that all systems/general purpose languages should have the same design goals or priorities. The word "manifesto" suggests we think otherwise. C++ programmers already have an "if it is not The Next Big Thing in Programming Languages, then why bother" attitude toward D. We don't want them to think of us as kooky zealots was well.
Sep 18 2010
JMRyan <nospam nospam.com> wrote:Simen Kjaeraas <simen.kjaras gmail.com> wrote in news:i6stke$o0v$1 digitalmars.com:gnHere's a draft of something I'd like to see. I like having the ten =3D=3D The D Manifesto =3D=3DPlease don't call it a manifesto. A statement of design goals or desi=principles says, "This is what we want to do." A manifesto says, "Thi=s =is what everybody should want to do.We'll interpret it as 'what everyone who wants to make D should want to do', then. :p Now, checking my dictionaries, I have found no support for your definition of manifesto: man=C2=B7i=C2=B7fes=C2=B7to (man-uh-fes-toh) =E2=80=93noun, plural -toes. a public declaration of intentions, opinions, objectives, or motives, as one issued by a government, sovereign, or organization. 1644, from Italian 'manifesto', Latin 'manifestum' - clear, evident. "Public declaration explaining past actions and announcing the motive for forthcoming ones," This does not seem too far off the mark for what the above guidelines are, and all other definitions I could find agreed with the above. -- = Simen
Sep 18 2010
On Saturday 18 September 2010 23:47:09 Simen kjaeraas wrote:JMRyan <nospam nospam.com> wrote:While manifesto may be technically correct, I tend to concur with JMRyan. I= t=20 seems to me to be far to ideological/political a term and potentially impli= es=20 that we're trying to impose it on others. All we're looking to do is to do = what=20 the subject says: give a summary of what the principles are behind D's desi= gn.=20 We're looking to make clear what D is aiming to do, not push anything on an= yone.=20 So, while manifesto make be technically correct, common usage tends to make= it=20 more forceful, so I concur that it would be a poor term to use. =2D Jonathan M DavisSimen Kjaeraas <simen.kjaras gmail.com> wrote in news:i6stke$o0v$1 =20 digitalmars.com:=20 We'll interpret it as 'what everyone who wants to make D should want to do', then. :p =20 Now, checking my dictionaries, I have found no support for your definition of manifesto: =20 man=C2=B7i=C2=B7fes=C2=B7to (man-uh-fes-toh) =E2=80=93noun, plural -toes. a public declaration of intentions, opinions, objectives, or motives, as one issued by a government, sovereign, or organization. =20 1644, from Italian 'manifesto', Latin 'manifestum' - clear, evident. "Public declaration explaining past actions and announcing the motive for forthcoming ones," =20 =20 This does not seem too far off the mark for what the above guidelines are, and all other definitions I could find agreed with the above.Here's a draft of something I'd like to see. I like having the ten =20 =3D=3D The D Manifesto =3D=3D=20 Please don't call it a manifesto. A statement of design goals or design principles says, "This is what we want to do." A manifesto says, "This is what everybody should want to do.
Sep 19 2010
On Sun, 19 Sep 2010 06:33:28 +0000, JMRyan wrote:Simen Kjaeraas <simen.kjaras gmail.com> wrote in news:i6stke$o0v$1 digitalmars.com:You're simply wrong. (Not just "technically", Jonathan.) -- JBHere's a draft of something I'd like to see. I like having the ten == The D Manifesto ==Please don't call it a manifesto. A statement of design goals or design principles says, "This is what we want to do." A manifesto says, "This is what everybody should want to do.This is exactly why the Date/Darwen manifesto choose that word. D is a good language. (I am forced to use Visual dBase in my day job, so I find D to be a really, Really, REALLY good language). There are other good languages out there. There is no reason that all systems/general purpose languages should have the same design goals or priorities. The word "manifesto" suggests we think otherwise. C++ programmers already have an "if it is not The Next Big Thing in Programming Languages, then why bother" attitude toward D. We don't want them to think of us as kooky zealots was well.
Sep 20 2010
On Monday, September 20, 2010 14:22:17 Jay Byrd wrote:On Sun, 19 Sep 2010 06:33:28 +0000, JMRyan wrote:The dictionary definition and the common usage of a word are not necessarily the same. It's not uncommon that a particular word is seen to have certain implications to it that are not part of the dictionary definition simply because of when and where people choose to use the word. So, people take the word to have extra meaning beyond what it has per its dictionary definiton. Manifesto is such a word. - Jonathan M DavisSimen Kjaeraas <simen.kjaras gmail.com> wrote in news:i6stke$o0v$1 digitalmars.com:You're simply wrong. (Not just "technically", Jonathan.) -- JBHere's a draft of something I'd like to see. I like having the ten == The D Manifesto ==Please don't call it a manifesto. A statement of design goals or design principles says, "This is what we want to do." A manifesto says, "This is what everybody should want to do.
Sep 20 2010
Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document.I agree, but let's be careful not to drift into trite platitudes. For example, Ted Neward pointed out to me that *every* programming language bills itself as productivity enhancing. A manifesto should list things that set D apart from the goals of other languages, and shouldn't just repeat things that every language claims to do.
Sep 17 2010
On Friday 17 September 2010 00:02:36 Walter Bright wrote:Andrei Alexandrescu wrote:And I was _so_ thinking of suggesting "write programs." ;) Excellent point. - Jonathan M DavisA coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document.I agree, but let's be careful not to drift into trite platitudes. For example, Ted Neward pointed out to me that *every* programming language bills itself as productivity enhancing. A manifesto should list things that set D apart from the goals of other languages, and shouldn't just repeat things that every language claims to do.
Sep 17 2010
I would like such a manifesto to emphasize the following aspects that together, make D unique IMO: * Programs may be as high or as low level as the programmer chooses. * No single style is imposed on the programmer. * The memory can be managed automatically or manually.
Sep 17 2010
I would like such a manifesto to emphasize the following aspects that together, make D unique IMO: * Programs may be as high or as low level as the programmer chooses. * No single style is imposed on the programmer. * The memory can be managed automatically or manually.Pragmatism not religion. Empower not mutilate. Safety not patronising.
Sep 17 2010
On 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On 17/09/2010 6:48 PM, Nick B wrote:On 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Using Walter's words this is a "trite platitude". Comments such as these are akin to saying "D is carbon neutral" without a supporting argument. Can you please support your argument with more substance, i.e. more sausage and less sizzle. :-)A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On 18/09/2010 12:28 a.m., Justin Johansson wrote:On 17/09/2010 6:48 PM, Nick B wrote:Is the fact there are two libraries, and not one, or twenty, a strength, and not a weakness, of the language and the D community. For example, see this list of (approx 100) C++ libraries: I think that this large number of libraries, just leads to fragmentation of effort by the C++ community. Nick BOn 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Using Walter's words this is a "trite platitude". Comments such as these are akin to saying "D is carbon neutral" without a supporting argument. Can you please support your argument with more substance, i.e. more sausage and less sizzle. :-)A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On Friday 17 September 2010 19:20:20 Nick B wrote:On 18/09/2010 12:28 a.m., Justin Johansson wrote:The fact that D has so few libraries is almost certainly temporary (not to mention, if you look at dsource, there are quite a few, though most of them are essentially dead). Even Java, which has an extensive standard library, has all kinds of 3rd party libraries floating around. Certainly, C++ suffers in part because its standard library is so lacking in functionality, but even if it were fantastic, there would still be plenty of C++ libraries floating around. Any language which is used by a lot of people will eventually have a lot of libraries unless the language itself somehow restricts it (which none do to my knowledge). There's nothing inherent in the D language which would restrict the number of libraries. Whether there is one library or 5 million has nothing to do with the language itself, so I really don't think that it makes sense to talk about the number of libraries that D has being part of the philosophy behind it. And honestly, while there aren't 100+ D libraries floating around, the division in the community over Phobos vs Tango gives the impression that one of the philosophies of D is to have one library. - Jonathan M DavisOn 17/09/2010 6:48 PM, Nick B wrote:Is the fact there are two libraries, and not one, or twenty, a strength, and not a weakness, of the language and the D community. For example, see this list of (approx 100) C++ libraries: I think that this large number of libraries, just leads to fragmentation of effort by the C++ community. Nick BOn 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Using Walter's words this is a "trite platitude". Comments such as these are akin to saying "D is carbon neutral" without a supporting argument. Can you please support your argument with more substance, i.e. more sausage and less sizzle. :-)A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
Fri, 17 Sep 2010 19:31:35 -0700, Jonathan M Davis wrote:On Friday 17 September 2010 19:20:20 Nick B wrote:Some people value the lack of libraries quite high. In fact, if you take a brief look at fresh new languages like Rust, there are lots of motivated individuals working on the same problems that have already been solved in many existing language communities. Then, take another look at this newsgroup, 10 years ago. Not many of those who used to use D back then are here now. Even the Tango developers have disappeared. We soon hear about the TDPL statistics. I'm sure a manifesto would make the general goals clearer, but the sad fact is that D has already lost some previously important key persons because the competition is quite intense.On 18/09/2010 12:28 a.m., Justin Johansson wrote:The fact that D has so few libraries is almost certainly temporary (not to mention, if you look at dsource, there are quite a few, though most of them are essentially dead). Even Java, which has an extensive standard library, has all kinds of 3rd party libraries floating around. Certainly, C++ suffers in part because its standard library is so lacking in functionality, but even if it were fantastic, there would still be plenty of C++ libraries floating around. Any language which is used by a lot of people will eventually have a lot of libraries unless the language itself somehow restricts it (which none do to my knowledge).On 17/09/2010 6:48 PM, Nick B wrote:Is the fact there are two libraries, and not one, or twenty, a strength, and not a weakness, of the language and the D community. For example, see this list of (approx 100) C++ libraries: I think that this large number of libraries, just leads to fragmentation of effort by the C++ community. Nick BOn 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Using Walter's words this is a "trite platitude". Comments such as these are akin to saying "D is carbon neutral" without a supporting argument. Can you please support your argument with more substance, i.e. more sausage and less sizzle. :-)A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On Sat, 18 Sep 2010 14:20:20 +1200, Nick B wrote:On 18/09/2010 12:28 a.m., Justin Johansson wrote:I gather that you are quite new to programming. Check /usr/lib on any linux system -- or check CPAN. Libraries are rife, and for good reason. And this has nothing whatsoever to do with Phobos vs. Tango, which are far from the only libraries for D -- their significance is that they are *core* libraries, akin to libc in C.On 17/09/2010 6:48 PM, Nick B wrote:Is the fact there are two libraries, and not one, or twenty, a strength, and not a weakness, of the language and the D community. For example, see this list of (approx 100) C++ libraries: I think that this large number of libraries, just leads to fragmentation of effort by the C++ community. Nick BOn 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Using Walter's words this is a "trite platitude". Comments such as these are akin to saying "D is carbon neutral" without a supporting argument. Can you please support your argument with more substance, i.e. more sausage and less sizzle. :-)A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 20 2010
Fri, 17 Sep 2010 21:18:04 +1200, Nick B wrote:On 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Did I sense a bit of irony there?A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On 18/09/2010 12:46 a.m., retard wrote:Fri, 17 Sep 2010 21:18:04 +1200, Nick B wrote:No.On 16/09/2010 5:58 a.m., Andrei Alexandrescu wrote:Did I sense a bit of irony there?A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance.there is no one, true, only to be used, library. D supports diversity.
Sep 17 2010
On 15/09/2010 19:58, Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles.to reduce it to the max. The AnDrei design principles ;] no, just kidding. Seriously I wish we could use D2 for our dot net development tasks. Guess we could save easily 30-40 percent of time just by using DBC, class invariants and /especially/ scope(exit). Despite that, D keeps the spirit of ALGOL alive, which is nice especially for programming enthusiasts coming from the Wirth side of life. my 2 euro cents. Bjoern
Sep 17 2010
Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. AndreiTo me some of the most distinguishing aspects of D are: like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.
Sep 18 2010
On 19/09/2010 2:59 AM, Lutger wrote:To me some of the most distinguishing aspects of D are: like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.I think the salient point that all miss is that D does not expand beyond the classical OO paradigm in any meaningful way. When all you have is a hammer, everything looks like a nail. When all you have is classical OO, everything looks like it can be modeled with inheritance by addition (rather than inheritance by restriction for example) or an interface (rather than a trait for example also). There is no need, or significant consumer demand, to reinvent another classical OO language in 2010. To make any inroad, a new language in these times needs to leverage upon some of the lesser well known yet powerful idioms of PLs that allow for extensible type systems. Cheers Justin Johansson
Sep 19 2010
Justin Johansson wrote:On 19/09/2010 2:59 AM, Lutger wrote:I don't understand this statement, there are quite a few things in D that support a different style of programming than OOP, such as: - closures for higher-order programming - pointers, systems programming features - templates - pure, transitive const and immutable Do you think this is not meaningful? Or do you mean that what is actually needed is a better OOP system than what D offers? What do you have in mind?To me some of the most distinguishing aspects of D are: like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.I think the salient point that all miss is that D does not expand beyond the classical OO paradigm in any meaningful way.
Sep 19 2010
On 19/09/2010 11:49 PM, Lutger wrote:Justin Johansson wrote:Some of these features you mention are very worthwhile but I mean that that D does not offer any better OOP system amongst its contemporary rivals. To be well read on the subject of OOP models I can recommend this link to a well-articulated paper by Bertrand Meyer: http://se.ethz.ch/~meyer/publications/computer/taxonomy.pdf Cheers Justin JohanssonOn 19/09/2010 2:59 AM, Lutger wrote:I don't understand this statement, there are quite a few things in D that support a different style of programming than OOP, such as: - closures for higher-order programming - pointers, systems programming features - templates - pure, transitive const and immutable Do you think this is not meaningful? Or do you mean that what is actually needed is a better OOP system than what D offers? What do you have in mind?To me some of the most distinguishing aspects of D are: like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.I think the salient point that all miss is that D does not expand beyond the classical OO paradigm in any meaningful way.
Sep 19 2010
Justin Johansson Wrote:On 19/09/2010 11:49 PM, Lutger wrote:tl;dr Anyway, D supports many paradigms, read the slides written by Walter in some conference. They are the truth. D supports imperative, procedural, functinal, metal, meta, constrain, dsl programming, among others. That should be enough.Justin Johansson wrote:Some of these features you mention are very worthwhile but I mean that that D does not offer any better OOP system amongst its contemporary rivals. To be well read on the subject of OOP models I can recommend this link to a well-articulated paper by Bertrand Meyer: http://se.ethz.ch/~meyer/publications/computer/taxonomy.pdfOn 19/09/2010 2:59 AM, Lutger wrote:I don't understand this statement, there are quite a few things in D that support a different style of programming than OOP, such as: - closures for higher-order programming - pointers, systems programming features - templates - pure, transitive const and immutable Do you think this is not meaningful? Or do you mean that what is actually needed is a better OOP system than what D offers? What do you have in mind?To me some of the most distinguishing aspects of D are: like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.I think the salient point that all miss is that D does not expand beyond the classical OO paradigm in any meaningful way.
Sep 19 2010
On 9/19/10 9:04 CDT, Justin Johansson wrote:To be well read on the subject of OOP models I can recommend this link to a well-articulated paper by Bertrand Meyer: http://se.ethz.ch/~meyer/publications/computer/taxonomy.pdfI don't consider that piece a recommendable read for contemporary OOP developments. Andrei
Sep 19 2010
Justin Johansson wrote:Some of these features you mention are very worthwhile but I mean that that D does not offer any better OOP system amongst its contemporary rivals. To be well read on the subject of OOP models I can recommend this link to a well-articulated paper by Bertrand Meyer: http://se.ethz.ch/~meyer/publications/computer/taxonomy.pdfThe article was written in 1996. It's just a taxonomy. Describing various inheritance schemes is not enough to argue for their adoption. One must show that it neatly solves significant problems that other schemes do not or can not. Meyer's ideas have consistently failed to gain any traction. I don't know why.
Sep 19 2010
On Sun, 19 Sep 2010 23:07:13 +1000, Justin Johansson wrote:On 19/09/2010 2:59 AM, Lutger wrote:Sorry, but "salient" is not a synonym for "false". Later you clarify by saying "D does not offer any better OOP system amongst its contemporary rivals" but that simply is not relevant to what you responded to.To me some of the most distinguishing aspects of D are: perhaps like python - focus on early binding: this quote from David Griers is fitting: "Never put off until run time what you can do at compile time." But also related is the tendency to choose for a rich set of features, binding at 'language design time' - support a diversity of programming styles (like C++, python) and attempt to integrate them - support for features that help, and avoid designs that complicate maintenance of large programs - take advantage of existing C knowledge and codebase - enable the programmer to make his own tradeoff between performance and other quality criteria: this is true of many languages, but in D there is a much wider space to choose from.I think the salient point that all miss is that D does not expand beyond the classical OO paradigm in any meaningful way.When all you have is a hammer, everything looks like a nail.But D provides more than one tool, so this is silly and misdirected.When all you have is classical OO, everything looks like it can be modeled with inheritance by addition (rather than inheritance by restriction for example) or an interface (rather than a trait for example also).Well, D has multiple subtyping, which is akin to traits.There is no need, or significant consumer demand, to reinvent another classical OO language in 2010.Sez you. What language currently meets D's goals?To make any inroad, a new language in these times needs to leverage upon some of the lesser well known yet powerful idioms of PLs that allow for extensible type systems.Sez you, but without supporting logic or evidence. Other languages have made inroads for quite different reasons.Cheers Justin Johansson
Sep 20 2010
One thing that seems to have been missed in this discussion: minimize (or at least reduce from C++ levels) undefined behavior. That's the reason for auto-initialized variables. It's not to provide aconvenience for those times when the default values are what you want. It's so that failure to initialize will cause your program to fail in consistent and predictable ways. It is also the reason for providng clear() as an alternative to delete(). Dereferencing dangling pointers results in undefined behavior. Accessing a cleared object results in admittedly bad but at least defined behavior.
Sep 19 2010
JMRyan wrote:One thing that seems to have been missed in this discussion: minimize (or at least reduce from C++ levels) undefined behavior. That's the reason for auto-initialized variables. It's not to provide aconvenience for those times when the default values are what you want. It's so that failure to initialize will cause your program to fail in consistent and predictable ways. It is also the reason for providng clear() as an alternative to delete(). Dereferencing dangling pointers results in undefined behavior. Accessing a cleared object results in admittedly bad but at least defined behavior.Good points.
Sep 19 2010
On 15/09/2010 18:58, Andrei Alexandrescu wrote:A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain? I know we discussed this once in the past, but couldn't find the discussion. Andrei(recapitulating something that popped in the middle of a discussion a while back) : * D aims to be suitable for medium and large sized software projects. In other words, it aims to scale well with increases of: developers, source code, software components, project duration, teams, third party components, etc.. I don't think this goal would actually influence D's design that much, because if language changes and features are carefully designed, they would rarely be detrimental to small scale projects in favor of medium or large ones. Rather, the big benefit of the statement above would be to reduce certain wasteful discussions or comments that pop-up occasionally in which someone proposes some "Pythonesque" change that might benefit small programs but would be crap for medium/large ones. -- Bruno Medeiros - Software Engineer
Oct 21 2010
Bruno Medeiros:Rather, the big benefit of the statement above would be to reduce certain wasteful discussions or comments that pop-up occasionally in which someone proposes some "Pythonesque" change that might benefit small programs but would be crap for medium/large ones.I suggest to judge each proposed feature on its own, instead of refusing all the "Pythonesque" changes together. A well designed tuple unpacking syntax will shorten D code and make it more readable and more handy to write, so I think it's a positive change, both for little and large D programs. As every language feature tuples too may be abused: in large programs if many of your functions/methods return tuples with five or six different anonymous fields, your program will not be much readable. Another "Pythonesque" example of change that I regard as positive for D programs of all sizes are lazy/eager array/range comprehensions. If you don't abuse them, they shorten code, make it more readable, and avoid the cluttering of brackets and parentheses typical of lambdas with map+array/filter+array functions. Bye, bearophile
Oct 21 2010
On 21/10/2010 18:07, bearophile wrote:Bruno Medeiros:I agree, and never suggested or implied otherwise! My reference to Python was a lighthearted one, I did not want to make a generic statement about all Python features (that's why I put quotes around "Pythonesque"). I am not even familiar with Python, other than it's syntax, and in fact, the indentation-as-blocks was the example I has in mind when I mentioned "Pythonesque".Rather, the big benefit of the statement above would be to reduce certain wasteful discussions or comments that pop-up occasionally in which someone proposes some "Pythonesque" change that might benefit small programs but would be crap for medium/large ones.I suggest to judge each proposed feature on its own, instead of refusing all the "Pythonesque" changes together.A well designed tuple unpacking syntax will shorten D code and make it more readable and more handy to write, so I think it's a positive change, both for little and large D programs. As every language feature tuples too may be abused: in large programs if many of your functions/methods return tuples with five or six different anonymous fields, your program will not be much readable. Another "Pythonesque" example of change that I regard as positive for D programs of all sizes are lazy/eager array/range comprehensions. If you don't abuse them, they shorten code, make it more readable, and avoid the cluttering of brackets and parentheses typical of lambdas with map+array/filter+array functions. Bye, bearophileI've just recalled another "corollary" design goal, a strictening of the previous one, that I would also like to see adopted: * If changes are of limited use to medium/large scale projects, they should also not be considered, even if they are not detrimental to projects of such scale. The reason for this is to save work in implementing languages tools (compilers, IDEs, any kind of code analysis tools, etc.). It should be obvious to everyone that the time of the programmers working such tools, especially the compiler, is a very precious resource. Indeed, Walter has already expressed his intention to not adopt features that are of limited use, however, how useful a feature is is very debatable and often not agreed upon. So what I am arguing for, in the point above, is that usefulness should only be evaluated in the context of medium/large projects. I am not implying that the tuple features you mentioned above have limited use like I described. I am not familiar with those changes at the moment and won't comment on them now. -- Bruno Medeiros - Software Engineer
Oct 22 2010