View mode: basic / threaded / horizontal-split · Log in · Help
January 03, 2010
Re: Does functional programming work?
Walter Bright Wrote:

> 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?

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.
January 03, 2010
Re: Does functional programming work?
yigal chripun wrote:
> Walter Bright Wrote:
> 
>> 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?
> 
> 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. 

You didn't answer the question. What's your opinion about why Smalltalk 
has failed to catch on?

Andrei
January 03, 2010
Re: Does functional programming work?
Andrei Alexandrescu Wrote:

> yigal chripun wrote:
> > Walter Bright Wrote:
> > 
> >> 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?
> > 
> > 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. 
> 
> You didn't answer the question. What's your opinion about why Smalltalk 
> has failed to catch on?
> 
> Andrei

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.
January 03, 2010
Re: Does functional programming work?
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; multi-paradigm languages like D/C#/CLisp are better if you have to write real programs. To write normal non-performance critical applications today C# (mixed 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
January 04, 2010
Re: Does functional programming work?
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 
common syntax you can more or less easily use c,c++,c#,d,java,scala,php, 
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.
January 04, 2010
Re: Does functional programming work?
Sat, 02 Jan 2010 12:23:36 -0800, Walter Bright wrote:

> 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?

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.
January 04, 2010
Re: Does functional programming work?
Fri, 01 Jan 2010 22:23:03 +0000, dsimcha wrote:

> == Quote from Nick Sabalausky (a@a.a)'s article
>> "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.html
>> Didn'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.
> 
> 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.
> 
> In multiparadigm languages like D, C++ and C#, the lack of ints, floats,
> 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**.

In 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.
January 04, 2010
Re: Does functional programming work?
Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:

> Nick Sabalausky wrote:
>> "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.html
>> 
>> Didn'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.
> 
> 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.

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.
January 04, 2010
Re: Does functional programming work?
retard wrote:
>> 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 
> common syntax you can more or less easily use c,c++,c#,d,java,scala,php, 
> 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.


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.
January 04, 2010
Re: Does functional programming work?
retard wrote:
> Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:
>> 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.

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.
1 2 3 4
Top | Discussion index | About this forum | D home