digitalmars.D - Does functional programming work?
- Walter Bright (2/2) Dec 30 2009 An interesting counterpoint to the usual FP hype:
- retard (5/8) Dec 30 2009 The related reddit comments seem to have more value than the article
- bearophile (4/5) Dec 30 2009 The right thing to do here is to learn a functional language (and its li...
- Nick Sabalausky (6/8) Jan 01 2010 Didn't read the original article, but the one being linked to is complet...
- Walter Bright (11/21) Jan 01 2010 I agree, the old programming-language-as-religion problem. I first ran
- Mike James (2/26) Jan 01 2010 You missed out on Delphi - IMO it gives C++ a good kicking ;->
- retard (21/47) Jan 03 2010 The programming-language-as-religion problem exists only in your
- Walter Bright (6/18) Jan 03 2010 Pick up a copy of "Pascal User Manual and Report." That's pure Pascal.
- grauzone (13/32) Jan 03 2010 That's all gone in modern Pascal dialects. Delphi is very similar to D;
- Walter Bright (7/33) Jan 04 2010 The problem was, in the 80's, pure Pascal was useless and so needed
- grauzone (5/40) Jan 04 2010 Yeah, as it was discussed in this thread. I was just posting this,
- Mike James (2/37) Jan 04 2010
- bearophile (9/10) Jan 04 2010 I didn't know it. They are for classes only for now, but in future they ...
- bearophile (16/24) Jan 04 2010 And as you know, C# was partially designed by the same people :-)
- #ponce (6/20) Jan 04 2010 Other interesting features of Delphi were:
- Ary Borenszweig (3/32) Jan 04 2010 You don't have an idea how many times I heard the phrase "Please,
- retard (8/42) Jan 04 2010 Now what does that prove? That the person has religious beliefs or that
- Nick Sabalausky (6/48) Jan 04 2010 Aren't there people who swear by those languages for normal software
- Daniel de Kok (8/12) Jan 04 2010 Yes, just like some people swear by 'everything is impure' languages,
- retard (20/34) Jan 04 2010 I think quite often the desire for practicality follows the principles o...
- Andrei Alexandrescu (4/38) Jan 04 2010 Meh. Most of the fundamentalist technologies exist in environments that
- Mike James (2/35) Jan 04 2010 But thats not to the God of Languages, thats to the God of Demonstration...
- dsimcha (11/20) Jan 01 2010 I actually think Smalltalk had the better idea. Java doesn't support an...
- Nick Sabalausky (6/35) Jan 01 2010 I certainly agree about Java and multiparadign languages, but I never
- yigal chripun (4/44) Jan 02 2010 Have you ever actually used Smalltalk?? I have used it and it's the easi...
- Walter Bright (2/10) Jan 02 2010 What's your opinion, then, about why Smalltalk has failed to catch on?
- yigal chripun (6/18) Jan 03 2010 That's a completely separate issue. Success of any product or idea depen...
- Andrei Alexandrescu (4/26) Jan 03 2010 You didn't answer the question. What's your opinion about why Smalltalk
- yigal chripun (10/38) Jan 03 2010 I thought I did. It's for simillar reasons as in my other examples. Java...
- bearophile (7/10) Jan 03 2010 The Windows95 OS may be worse, but the GUI of XP was much more refined a...
- retard (36/53) Jan 03 2010 Ha, oh really? The fact is, all major desktop environments have their
- Walter Bright (7/21) Jan 03 2010 Syntax is just syntax, not semantics, and I'm not sure there's any
- retard (8/20) Jan 03 2010 The same question could be asked just about any language. If you have
- Michael Rynn (30/52) Jan 04 2010 I had a quick look to see what Clojure was about, and watched the video
- retard (7/32) Jan 03 2010 In Java generics doesn't work with primitive types, in D it does. And
An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.html
Dec 30 2009
Wed, 30 Dec 2009 17:46:58 -0800, Walter Bright wrote:An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlThe related reddit comments seem to have more value than the article (again, the author didn't really get his monads right): http://www.reddit.com/r/programming/comments/aje5b/ functional_programming_doesnt_work_and_what_to_do/
Dec 30 2009
Walter Bright:An interesting counterpoint to the usual FP hype:<The right thing to do here is to learn a functional language (and its lingo) and to try to use it to write some programs. It's time way better spent than reading articles about functional programming :-) Bye, bearophile
Dec 30 2009
"Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 01 2010
Nick Sabalausky wrote:"Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 01 2010
Walter Bright Wrote:Nick Sabalausky wrote:You missed out on Delphi - IMO it gives C++ a good kicking ;->"Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 01 2010
Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Nick Sabalausky wrote:The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask. Switching from Pascal to C is like swiching from Christianity to Islam. Both are strict monotheistic mainstream religions. C developed into C++. The Pascal equivalent is Object Pascal. Also those are pretty similar. TurboPascal = borland's brand for their pascal compiler - ever heard of Turbo C? From Pascal user's point of view: "I never got on the later bandwagons of Objective C, C++, Turbo C, etc. Never even looked at them." The languages are no religions per se. Some single paradigm languages are single paradigm theoretic experiments for a good reason. E.g. how else would you prove things like Curry-Howard correspondence? (Go ahead - do it in D..) Those language were not meant to be practical programming languages. It just happens to be the case that some people managed to build a real world compiler for them. But of course that's possible - the languages mostrly are Turing complete etc."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 03 2010
retard wrote:Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Pick up a copy of "Pascal User Manual and Report." That's pure Pascal. It's also quite useless. Your program has to be all in one file, for instance. For another, writing I/O always appends a newline. Try writing binary files with that. There was no way to get at the bit representation of a type. Etc.When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask.
Jan 03 2010
Walter Bright wrote:retard wrote:That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...). The only thing that was really lacking in Delphi are templates. But for compensation, it had powerful RTTI. Try writing a reflection/serialization mechanism in D that's as powerful Delphi's. I bet you won't succeed, not even with D2. (Need to fix some compiler bugs or deficiencies in the area of __traits first.) Even if you succeed, the end result will be probably harder to use. (If that sounds polemic, show me a D library that implements full serialization on Delphi/Java/whatever level, and I'll shut up.)Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Pick up a copy of "Pascal User Manual and Report." That's pure Pascal. It's also quite useless. Your program has to be all in one file, for instance. For another, writing I/O always appends a newline. Try writing binary files with that. There was no way to get at the bit representation of a type. Etc.When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask.
Jan 03 2010
grauzone wrote:Walter Bright wrote:The problem was, in the 80's, pure Pascal was useless and so needed dialects. Every Pascal vendor added a boatload of extensions, all incompatible with each other. None had enough market share to create a de-facto standard. All this left a huge opening for C, and the rest, as they say, is history. The market window closed for Pascal.retard wrote:That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...).Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Pick up a copy of "Pascal User Manual and Report." That's pure Pascal. It's also quite useless. Your program has to be all in one file, for instance. For another, writing I/O always appends a newline. Try writing binary files with that. There was no way to get at the bit representation of a type. Etc.When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask.
Jan 04 2010
Walter Bright wrote:grauzone wrote:Yeah, as it was discussed in this thread. I was just posting this, because you tell so often about your bad experiences with Pascal. I context of retard's posting I also found it funny how the history of programming languages seems to repeat itself.Walter Bright wrote:The problem was, in the 80's, pure Pascal was useless and so needed dialects. Every Pascal vendor added a boatload of extensions, all incompatible with each other. None had enough market share to create a de-facto standard. All this left a huge opening for C, and the rest, as they say, is history. The market window closed for Pascal.retard wrote:That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...).Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Pick up a copy of "Pascal User Manual and Report." That's pure Pascal. It's also quite useless. Your program has to be all in one file, for instance. For another, writing I/O always appends a newline. Try writing binary files with that. There was no way to get at the bit representation of a type. Etc.When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask.
Jan 04 2010
Walter Bright Wrote:grauzone wrote:Borland Pascal, Borland Pascal with Objects and Borland Delphi became the de-facto standard. They dropped the ball and Freepascal/Lazarus picked up the ball. Freepascal now includes templates.Walter Bright wrote:The problem was, in the 80's, pure Pascal was useless and so needed dialects. Every Pascal vendor added a boatload of extensions, all incompatible with each other. None had enough market share to create a de-facto standard.retard wrote:That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...).Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:Pick up a copy of "Pascal User Manual and Report." That's pure Pascal. It's also quite useless. Your program has to be all in one file, for instance. For another, writing I/O always appends a newline. Try writing binary files with that. There was no way to get at the bit representation of a type. Etc.When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.The programming-language-as-religion problem exists only in your imagination. I fail to see Pascal as a religion. I don't know what the pure Pascal compiler you're talking about is, but ordinary Pascal is just another procedural systems programming language like C. It has a bit different syntax ("begin end" vs "{}" and so on), somewhat different rules for some default data types, but it's more or less C wrapped in a syntactic mask.All this left a huge opening for C, and the rest, as they say, is history. The market window closed for Pascal.
Jan 04 2010
Mike James:Freepascal now includes templates.<I didn't know it. They are for classes only for now, but in future they may add for records, functions, etc, too. They are named Generics: http://www.freepascal.org/docs-html/ref/refch8.html It has operator overloading too: http://www.freepascal.org/docs-html/ref/refch12.html (And other things like built-in properties were already present). FreePascal generics are more limited than D2 templates, but FreePascal has metaclasses and RTTI that replace some template purposes. Now FreePascal looks like a quite expressive language, you can probably use it to do most of things you can do with D :-) Bye, bearophile
Jan 04 2010
grauzone:That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...).About Delphi virtual constructors: http://www.felix-colibri.com/papers/oop_components/delphi_virtual_constructor/delphi_virtual_constructor.html About Delphi named constructors: In Table 2-1 shows a list of some Delphi features: http://oreilly.com/catalog/delphi/chapter/ch02.html Beside virtual methods there are dynamic methods too, that are unrelated toInstead of using the virtual directive, you can also use the dynamic directive. The semantics are identical, but the implementation is different. Looking up a virtual method in a VMT is fast because the compiler generates an index directly into a VMT. Looking up a dynamic method is slower. Calling a dynamic method requires a linear search of a class's dynamic method table (DMT). If the class does not override that method, the search continues with the DMT of the base class. The search continues with ancestor classes until TObject is reached or the method is found. The tradeoff is that in a few circumstances, dynamic methods take up less memory than virtual methods. Unless you are writing a replacement for the VCL, you should use virtual methods, not dynamic methods. See Chapter 3 for a complete explanation of how dynamic and virtual methods are implemented.<There are even metaclasses (from the same document):A class, too, is a distinct entity (as in Java, but unlike C++). Delphi's representation of a class is a read-only table of pointers to virtual methods and lots of information about the class. A class reference is a pointer to the table. (Chapter 3, Runtime Type Information, describes in depth the layout of the class tables.) The most common use for a class reference is to create objects or to test the type of an object reference, but you can use class references in many other situations, including passing class references as routine parameters or returning a class reference from a function. The type of a class reference is called a metaclass.<In C++/D to do something similar to metaclasses you use templates: http://marcin.wudarczyk.pl/education/tipstricks/metacls.htmThe only thing that was really lacking in Delphi are templates. But for compensation, it had powerful RTTI.About Delphi RTTI, this document is not new (it seems updated to Delphi 4, that's a bit ancient) but it looks well written: http://www.blong.com/Conferences/BorConUK98/DelphiRTTI/CB140.htm Bye, bearophile
Jan 04 2010
That's all gone in modern Pascal dialects. Delphi is very similar to D; it's practically a Pascal version of D. The OOP features are the same, except for some small differences, which make Delphi a bit more flexible (virtual and named constructors...). The only thing that was really lacking in Delphi are templates. But for compensation, it had powerful RTTI. Try writing a reflection/serialization mechanism in D that's as powerful Delphi's. I bet you won't succeed, not even with D2. (Need to fix some compiler bugs or deficiencies in the area of __traits first.) Even if you succeed, the end result will be probably harder to use. (If that sounds polemic, show me a D library that implements full serialization on Delphi/Java/whatever level, and I'll shut up.)Other interesting features of Delphi were: - incredibly fast compilation time allowed by the language, you can almost develop in release mode - properties "done right", with zero overhead (but cumbersome to write) - similar productivity and feeling that D can provide - very good low-level bit manipulation: absolute prevent all union tricks, "value" type casts are reinterpret_cast (no way to turn a float into an int silently), inline-assembly like D - "Borland fastcall", using the three registers EAX, ECX and EDX
Jan 04 2010
retard wrote:Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:You don't have an idea how many times I heard the phrase "Please, please, let this work" out of a programmer's mouth in front of a computer.Nick Sabalausky wrote:The programming-language-as-religion problem exists only in your imagination."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 04 2010
Mon, 04 Jan 2010 07:50:12 -0200, Ary Borenszweig wrote:retard wrote:Now what does that prove? That the person has religious beliefs or that programming languages are religions? My point was, it's just stupid to claim that some languages like ML or Iswim are religions. They were originally built for scientific use, namely for proving mathematical properties of some systems and as a proof of concept. I guess lolcode isn't a religion in your book because not only is it useless, it's fun unlike most functional languages.Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:You don't have an idea how many times I heard the phrase "Please, please, let this work" out of a programmer's mouth in front of a computer.Nick Sabalausky wrote:The programming-language-as-religion problem exists only in your imagination."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 04 2010
"retard" <re tard.com.invalid> wrote in message news:hhsmop$1aev$5 digitalmars.com...Mon, 04 Jan 2010 07:50:12 -0200, Ary Borenszweig wrote:Aren't there people who swear by those languages for normal software development purposes? And even if not, there are certainly languages out there that are "cram everything into this paradigm, yay purity!" and *are* either intended for everyday use or used by people for everyday use.retard wrote:Now what does that prove? That the person has religious beliefs or that programming languages are religions? My point was, it's just stupid to claim that some languages like ML or Iswim are religions. They were originally built for scientific use, namely for proving mathematical properties of some systems and as a proof of concept. I guess lolcode isn't a religion in your book because not only is it useless, it's fun unlike most functional languages.Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:You don't have an idea how many times I heard the phrase "Please, please, let this work" out of a programmer's mouth in front of a computer.Nick Sabalausky wrote:The programming-language-as-religion problem exists only in your imagination."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 04 2010
On 2010-01-04 19:15:39 +0100, "Nick Sabalausky" <a a.a> said:Aren't there people who swear by those languages for normal software development purposes? And even if not, there are certainly languages out there that are "cram everything into this paradigm, yay purity!" and *are* either intended for everyday use or used by people for everyday use.Yes, just like some people swear by 'everything is impure' languages, and go lengths to achieve immutability (e.g. Java). Why are those prefering purity called religious, and those using completely 'impure' languages practical? Pure, partially pure, impure. All regimes can be religious or practical, or both. -- Daniel
Jan 04 2010
Mon, 04 Jan 2010 20:04:13 +0100, Daniel de Kok wrote:On 2010-01-04 19:15:39 +0100, "Nick Sabalausky" <a a.a> said:I think quite often the desire for practicality follows the principles of fundamentalism. I don't want to hurt anyone's feelings with this OT talk, but even as an atheist I admit that some religions are quite ok. But the fundamentalists are almost always dangerous to the persons near them. It's quite common to hear things like - "Everything must be modeled in UML 2.0" - "This development process solves all problems, even the ones introduced on the language level" - "C++ and template metaprogramming provides extreme optimal performance on this problem domain" - "Large doses of REST, AJAX, XML, and Web 2.0 cloud will so totally save this crappy project" - "100% coverage in unit tests is integral part of our process. It guarantees delivery of high quality end products" - "In clean code functions should accept only one parameter" Most of the fundamentalist technologies exist - surprise, surprise - only in the imperative mainstream programmer world. That world is so full of all kinds of pseudo-science that it often makes me vomit. But it's often nicer than unemployment..Aren't there people who swear by those languages for normal software development purposes? And even if not, there are certainly languages out there that are "cram everything into this paradigm, yay purity!" and *are* either intended for everyday use or used by people for everyday use.Yes, just like some people swear by 'everything is impure' languages, and go lengths to achieve immutability (e.g. Java). Why are those prefering purity called religious, and those using completely 'impure' languages practical? Pure, partially pure, impure. All regimes can be religious or practical, or both.
Jan 04 2010
retard wrote:Mon, 04 Jan 2010 20:04:13 +0100, Daniel de Kok wrote:Meh. Most of the fundamentalist technologies exist in environments that are being used and need improvement. AndreiOn 2010-01-04 19:15:39 +0100, "Nick Sabalausky" <a a.a> said:I think quite often the desire for practicality follows the principles of fundamentalism. I don't want to hurt anyone's feelings with this OT talk, but even as an atheist I admit that some religions are quite ok. But the fundamentalists are almost always dangerous to the persons near them. It's quite common to hear things like - "Everything must be modeled in UML 2.0" - "This development process solves all problems, even the ones introduced on the language level" - "C++ and template metaprogramming provides extreme optimal performance on this problem domain" - "Large doses of REST, AJAX, XML, and Web 2.0 cloud will so totally save this crappy project" - "100% coverage in unit tests is integral part of our process. It guarantees delivery of high quality end products" - "In clean code functions should accept only one parameter" Most of the fundamentalist technologies exist - surprise, surprise - only in the imperative mainstream programmer world.Aren't there people who swear by those languages for normal software development purposes? And even if not, there are certainly languages out there that are "cram everything into this paradigm, yay purity!" and *are* either intended for everyday use or used by people for everyday use.Yes, just like some people swear by 'everything is impure' languages, and go lengths to achieve immutability (e.g. Java). Why are those prefering purity called religious, and those using completely 'impure' languages practical? Pure, partially pure, impure. All regimes can be religious or practical, or both.
Jan 04 2010
Ary Borenszweig Wrote:retard wrote:But thats not to the God of Languages, thats to the God of Demonstrations...Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:You don't have an idea how many times I heard the phrase "Please, please, let this work" out of a programmer's mouth in front of a computer.Nick Sabalausky wrote:The programming-language-as-religion problem exists only in your imagination."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I agree, the old programming-language-as-religion problem. I first ran into this when I read the original Pascal book, and became enamored with it. I tried doing a modest project in Pascal using a pure Pascal compiler. 80% went smoothly, the other 20% spent wrestling with the nanny language tsk-tsking consumed nearly 100% of the time spend on the project. I just couldn't get things that had to be done, done, as the language would shut off all the avenues. When I then picked up K+R C, I never wrote another line of Pascal. It so soured me on Pascal that I never got on the later bandwagons of Modula II, Delphi, TurboPascal, etc. Never even looked at them.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 04 2010
== Quote from Nick Sabalausky (a a.a)'s article"Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I actually think Smalltalk had the better idea. Java doesn't support any paradigm besides OO well, and neither does Smalltalk. The difference is that, in Smalltalk, at least everything is an object, so you can do "pure" OO well. Java is "almost pure" OO, but it lack of ints, floats, etc. being objects, combined with its lack of support for any paradigm that works well without ints, floats, etc. being objects, makes the language feel like a massive kludge, and leads to debacles like autoboxing to get around this. being objects is less of an issue because, although it's a wart in the OO system, noone is forcing you to use the OO system for **everything**.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 01 2010
"dsimcha" <dsimcha yahoo.com> wrote in message news:hhlsk7$2v03$1 digitalmars.com...== Quote from Nick Sabalausky (a a.a)'s articleI certainly agree about Java and multiparadign languages, but I never understood how, for instance, making the "if" statement an object ever did anything but obfuscate Smalltalk and give people warm fuzzies for being uber-consistent."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I actually think Smalltalk had the better idea. Java doesn't support any paradigm besides OO well, and neither does Smalltalk. The difference is that, in Smalltalk, at least everything is an object, so you can do "pure" OO well. Java is "almost pure" OO, but it lack of ints, floats, etc. being objects, combined with its lack of support for any paradigm that works well without ints, floats, etc. being objects, makes the language feel like a massive kludge, and leads to debacles like autoboxing to get around this. etc. being objects is less of an issue because, although it's a wart in the OO system, noone is forcing you to use the OO system for **everything**.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 01 2010
Nick Sabalausky Wrote:"dsimcha" <dsimcha yahoo.com> wrote in message news:hhlsk7$2v03$1 digitalmars.com...Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.== Quote from Nick Sabalausky (a a.a)'s articleI certainly agree about Java and multiparadign languages, but I never understood how, for instance, making the "if" statement an object ever did anything but obfuscate Smalltalk and give people warm fuzzies for being uber-consistent."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I actually think Smalltalk had the better idea. Java doesn't support any paradigm besides OO well, and neither does Smalltalk. The difference is that, in Smalltalk, at least everything is an object, so you can do "pure" OO well. Java is "almost pure" OO, but it lack of ints, floats, etc. being objects, combined with its lack of support for any paradigm that works well without ints, floats, etc. being objects, makes the language feel like a massive kludge, and leads to debacles like autoboxing to get around this. etc. being objects is less of an issue because, although it's a wart in the OO system, noone is forcing you to use the OO system for **everything**.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 02 2010
yigal chripun wrote:Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 02 2010
Walter Bright Wrote:yigal chripun wrote:That's a completely separate issue. Success of any product or idea depends on many aspects of which technical superiority is only one. I've used Smalltalk and it is most definitly superior to most other languages including D. Compare to cars - the most popular and successful design is that of the internal combustion engine yet it's the worst design in technical terms, there are more effecient and much cleaner designs. compare to OSes - Unix died in the Unix wars and was replaced by a much worse system called windows which today has over 90% market share. Windows is by far the worst OS ever and yet this is the design that won. Technically speaking Linux today is much better and I enjoyed using it but ultimatly my main system today is windows 7 and not for technical reasons. Compare to Java - a mediocre language at best yet very popular and in fact I'd prefer to use Java over D too beacuse the fact that D is a (much) better langauge is a tiny aspect of productivity of a programmer. Java has a lot of amazing tools that support it and a lot of freely available libraries while in D we still can't have only one standard lib. So while it's fun to play with D, for real stuff I'll prefer Java with eclipse and all the standardized libs that make my life that much more simple.Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 03 2010
yigal chripun wrote:Walter Bright Wrote:You didn't answer the question. What's your opinion about why Smalltalk has failed to catch on? Andreiyigal chripun wrote:That's a completely separate issue. Success of any product or idea depends on many aspects of which technical superiority is only one. I've used Smalltalk and it is most definitly superior to most other languages including D. Compare to cars - the most popular and successful design is that of the internal combustion engine yet it's the worst design in technical terms, there are more effecient and much cleaner designs. compare to OSes - Unix died in the Unix wars and was replaced by a much worse system called windows which today has over 90% market share. Windows is by far the worst OS ever and yet this is the design that won. Technically speaking Linux today is much better and I enjoyed using it but ultimatly my main system today is windows 7 and not for technical reasons. Compare to Java - a mediocre language at best yet very popular and in fact I'd prefer to use Java over D too beacuse the fact that D is a (much) better langauge is a tiny aspect of productivity of a programmer. Java has a lot of amazing tools that support it and a lot of freely available libraries while in D we still can't have only one standard lib. So while it's fun to play with D, for real stuff I'll prefer Java with eclipse and all the standardized libs that make my life that much more simple.Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 03 2010
Andrei Alexandrescu Wrote:yigal chripun wrote:I thought I did. It's for simillar reasons as in my other examples. Java was a success because it was offered free of charge with a big supportive environment - libs, tools, documantation, etc and was promoted havily by Sun. Smalltalk OTOH was sold by a few vendors that didn't know how to promote it and build a vibrant comunity around it. Those vendors didn't supply libs for common stuff the industry uses and don't forget that one of its goals was to have an educational system for kids rather than something the industry will use. The industry rarely uses products based on its technical merits anyway - they don't and shouldn't care what language is technically "better". they care only for the bottom line. that means that Java is the best for the industry: 1) has many existing tools and libs that enhance productivity and reduced the amount of code that is neeed to be written in house. 2) there are many Java programmers so it's easy to find better qulity programmers and pay them less. 3) the write once run anywhere promise - obviously saves money. 4) Is standardized yet has many vendors - no need to invest when switching vendor. BTW, none of the above apply to D.Walter Bright Wrote:You didn't answer the question. What's your opinion about why Smalltalk has failed to catch on? Andreiyigal chripun wrote:That's a completely separate issue. Success of any product or idea depends on many aspects of which technical superiority is only one. I've used Smalltalk and it is most definitly superior to most other languages including D. Compare to cars - the most popular and successful design is that of the internal combustion engine yet it's the worst design in technical terms, there are more effecient and much cleaner designs. compare to OSes - Unix died in the Unix wars and was replaced by a much worse system called windows which today has over 90% market share. Windows is by far the worst OS ever and yet this is the design that won. Technically speaking Linux today is much better and I enjoyed using it but ultimatly my main system today is windows 7 and not for technical reasons. Compare to Java - a mediocre language at best yet very popular and in fact I'd prefer to use Java over D too beacuse the fact that D is a (much) better langauge is a tiny aspect of productivity of a programmer. Java has a lot of amazing tools that support it and a lot of freely available libraries while in D we still can't have only one standard lib. So while it's fun to play with D, for real stuff I'll prefer Java with eclipse and all the standardized libs that make my life that much more simple.Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 03 2010
yigal chripun:Compare to cars - the most popular and successful design is that of the internal combustion engine yet it's the worst design in technical terms, there are more effecient and much cleaner designs.Most of those alternative designs have one or more flaws, or used to have in the past. The two-stroke and four-stroke engines (diesel too) are not perfect, but they don't come from random evolution. Today building hybrid engines, etc, is better, but you need technologies like supercapacitors, good batteries, ceramic inserts, good control electronics, good high-performance steel, and so on and on, that where not available in the past.compare to OSes - Unix died in the Unix wars and was replaced by a much worse system called windows which today has over 90% market share. Windows is by far the worst OS ever and yet this is the design that won. Technically speaking Linux today is much better and I enjoyed using it but ultimatly my main system today is windows 7 and not for technical reasons.The Windows95 OS may be worse, but the GUI of XP was much more refined and usable for non-guru-level users. Things are slowly changing, as Ubuntu GUI gets a bit better, it eventually will become about as good as Windows95 GUI or better :-) Most people don't care of a better kernel if the OS interface forces you to edit small text files spread everywhere that risk breaking your system at each little error :o)Compare to Java - a mediocre language at best yet very popular and in fact I'd prefer to use Java over D too beacuse the fact that D is a (much) better langauge is a tiny aspect of productivity of a programmer.<Compared to D Java is also much safer than D, its compiler gives better error messages, its GCs are way better, its semantics is better defined and better enforced, HotSpot is better than even LDC with LLVM and can lead to faster programs, Java as language is simpler to learn and to use, you can run it in a browser, it's simpler to add/change parts to a Java program at runtime, its reflection is better, etc. I like D more, but Java is not bad. Regarding Smalltalk, its syntax is weird for people that come from C/C++, its performance can't be compared to the current Java performance. I think that using txt source files, as in Java, is more compatible with the way many people have programmed. I don't believe in "idealistic pure" languages, as Smalltalk; with few other things like C++) looks like the best language (and I think eventually in few more years it will become free enough to be usable on non Windows systems too). Bye, bearophile
Jan 03 2010
Sun, 03 Jan 2010 09:00:53 -0500, bearophile wrote:yigal chripun: The Windows95 OS may be worse, but the GUI of XP was much more refined and usable for non-guru-level users. Things are slowly changing, as Ubuntu GUI gets a bit better, it eventually will become about as good as Windows95 GUI or better :-)Ha, oh really? The fact is, all major desktop environments have their usability and technical issues. Ubuntu is a rather small player in this game. For instance Apple has been selling Macs really aggressively. KDE4 is also becoming a serious alternative - Qt *is* very powerful (if not best) toolkit for building modern desktop applications. Now that many intranet and internet applications are being built on web (2.0) platform, the choice of OS shouldn't matter. But in reality many intranet apps still require IE 6 and ActiveX. Some internet apps only work in internet explorer 6 or 7 (wine + unofficial ie packs help in this, of course). No matter how good the competitive products are and how little they cost (they're free as in beer, as everyone here might know), it will take tens of years for people and industries to switch. Even if Microsoft had died some years ago and WinXP was the latest windows release for some unknown reason, probably the majority (>50% of users) would start using alternative OSes in 2030, definitely no sooner.Most people don't care of a better kernel if the OS interface forces you to edit small text files spread everywhere that risk breaking your system at each little error :o)Most people are dumb as a rock. They think you need MS Office Word for writing e-mails. They know that IE6 = internet = computer = email = facebook = web = google = browser = virus = something. They buy stuff because a salesman tells them to. Usually the salesman recommends buying latest Windows, MS Office Pro, Adobe Photoshop, and other interesting stuff like the most expensive anti-virus software available when a clueless casual user asks anything.Compared to D Java is also much safer than D, its compiler gives better error messages, its GCs are way better, its semantics is better defined and better enforced, HotSpot is better than even LDC with LLVM and can lead to faster programs, Java as language is simpler to learn and to use, you can run it in a browser, it's simpler to add/change parts to a Java program at runtime, its reflection is better, etc. I like D more, but Java is not bad.Don't forget aspectj and other aspect frameworks, interoperatibility with other jvm languages.Regarding Smalltalk, its syntax is weird for people that come from C/C++I claim that currently this is the main reason for people not adopting Smalltalk or any other language. Even if smalltalk was 50% faster than C+ + and 100% safer, there would be legions of morons how still want to stick with C++ or C when building end-user GUI applications. Mainstream programmers don't want to use their brain - they're happy with the C family syntax and refuse to learn any other syntax. After all, with the and many less known languages. Most mainstream programmers also only know the parts of these languages that they all share - a nice imperative dialect which is very handy for writing ugly, buggy, and badly performing business code.
Jan 03 2010
retard wrote:Syntax is just syntax, not semantics, and I'm not sure there's any particular reason why Smalltalk could not use curly brace syntax. If I was the Smalltalk creator, and syntax was the barrier to adopting it, I'd change the syntax. D deliberately uses the C/C++/Java style syntax because that is the most popular and well known.Regarding Smalltalk, its syntax is weird for people that come from C/C++I claim that currently this is the main reason for people not adopting Smalltalk or any other language. Even if smalltalk was 50% faster than C+ + and 100% safer, there would be legions of morons how still want to stick with C++ or C when building end-user GUI applications. Mainstream programmers don't want to use their brain - they're happy with the C family syntax and refuse to learn any other syntax. After all, with the and many less known languages. Most mainstream programmers also only know the parts of these languages that they all share - a nice imperative dialect which is very handy for writing ugly, buggy, and badly performing business code.
Jan 03 2010
Sat, 02 Jan 2010 12:23:36 -0800, Walter Bright wrote:yigal chripun wrote:The same question could be asked just about any language. If you have followed the internet discussion & hype around JVM/.NET languages - these are all very young languages and share many aspects. Languages like Clojure seem to be doing well.. Why? Charismatic leaders, perhaps? "Clojure: Lisp done right" - I don't believe that, but many do. People are sheeple. They believe that languages are religions. Marketing matters. Technical superiority rarely has much effect.Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 03 2010
On Mon, 04 Jan 2010 04:10:28 +0000, retard wrote:Sat, 02 Jan 2010 12:23:36 -0800, Walter Bright wrote:I had a quick look to see what Clojure was about, and watched the video on the link on the http://clojure.org site. (Video of a talk from QCon on State and Identity). Clojure is designed as better ways to mix imperative and functional parts of programs easily "on a local system". No more messing directly with locks, which can have problems. ( which "only experts can get right initially, and then its hard to maintain"). With multi-processor cores, easily doing parallel programming is becoming the future. We cannot expect as programmers to "stop the world" as in iterative-only programming. Well it was a good sales talk. I found the complicated ways of using indirection to support different versions of object instances using shared tree node membership, interesting, and the statement that we had better get used to the idea that the version being accessed may already be outdated, and the use of time relative checks, compare and Set, immutable data, software transactional memory (STM). And Lisp syntax. But no classic OO inheritance. A lot of things needed to support concurrency, and Richard Hickey says you have to do all of clojures tricks to make it all work. The builtin collection facilities are designed with the STM support. Its for JVM or CLR. Most programs, with the exeception of multi-user databases and servers, massive climate and weather models, maybe a few concurrent threads at most. Of course we can still get by with fiddling synchronized object locks, notify and wait. Its nice if the language has support built in. I look forward to seeing results of more evolution of D to support concurrency, and what will need to change.yigal chripun wrote:The same question could be asked just about any language. If you have followed the internet discussion & hype around JVM/.NET languages - these are all very young languages and share many aspects. Languages like Clojure seem to be doing well.. Why? Charismatic leaders, perhaps? "Clojure: Lisp done right" - I don't believe that, but many do. People are sheeple. They believe that languages are religions. Marketing matters. Technical superiority rarely has much effect.Have you ever actually used Smalltalk?? I have used it and it's the easiest language to use by far, having conditionals as methods of Boolean is much better, easier to read and more flexiable. The beauty of smalltalk is that you can easily add new "language" features in the library with little effort and they do not look foreign to the language. in fact, almost all of smalltalk is implemented in the library and it only has 5 actual keywords.What's your opinion, then, about why Smalltalk has failed to catch on?
Jan 04 2010
Fri, 01 Jan 2010 22:23:03 +0000, dsimcha wrote:== Quote from Nick Sabalausky (a a.a)'s articleIn Java generics doesn't work with primitive types, in D it does. And generics often happens to be the most useful way of providing polymorphism in that context. In "pure OOP languages" all primitives are objects so normal sub-typing works. That also solves the issue, although it has an impact on performance. These are the main reasons why Java feels kludgy in this area."Walter Bright" <newshound1 digitalmars.com> wrote in message news:hhgvqk$8cj$2 digitalmars.com...I actually think Smalltalk had the better idea. Java doesn't support any paradigm besides OO well, and neither does Smalltalk. The difference is that, in Smalltalk, at least everything is an object, so you can do "pure" OO well. Java is "almost pure" OO, but it lack of ints, floats, etc. being objects, combined with its lack of support for any paradigm that works well without ints, floats, etc. being objects, makes the language feel like a massive kludge, and leads to debacles like autoboxing to get around this. etc. being objects is less of an issue because, although it's a wart in the OO system, noone is forcing you to use the OO system for **everything**.An interesting counterpoint to the usual FP hype: http://prog21.dadgum.com/55.htmlDidn't read the original article, but the one being linked to is completely in line with how I feel about not just FP, but all programming paradigms, for example, OO: It's great as long as you don't pull a Java or (worse yet) a Smalltalk and try to cram *everything* into the paradigm.
Jan 03 2010