March 21, 2006
Sean Kelly wrote:
> ...  Though it's worth mentioning that one of the motivating factors in my decision is which OS has the best games ;-)
> 

Yeah, that was tough for me. I left Windows for Linux about two years ago, but there are a few benefits. One, I spend more time programming now then on games. Which is good because I need to make some demos or games so I can get hired by (or start) a game company. And two, the windows platform is saturated with games, whereas Mac and Linux could use some help (so it might be easier to break into the market there).

My only problem with Linux is that most people expect free software, and there isn't really an easy way to distribute paid software (and packaging software seems like a pain). So hopefully I'll be getting a Mac soon. Only no dmd... doh!
March 21, 2006
These are a lot of very interesting observations that never occurred to me.

Are you teaching D as a first language, or just thinking about it?


March 21, 2006
Walter Bright wrote:
> These are a lot of very interesting observations that never occurred to me.
> 
> Are you teaching D as a first language, or just thinking about it? 
> 
> 

I think D would make a perfect first language.
All we need is for the compiler to silently insert "import std.stdio;"

And .. a book, of course!
March 21, 2006
In article <dvo182$1vl4$1@digitaldaemon.com>, Hasan Aljudy says...
>
>Walter Bright wrote:
>> These are a lot of very interesting observations that never occurred to me.
>> 
>> Are you teaching D as a first language, or just thinking about it?
>> 
>> 
>
>I think D would make a perfect first language.
>All we need is for the compiler to silently insert "import std.stdio;"
>
>And .. a book, of course!

I bet most people would think that would be ok as long as there was a compiler switch to disable it.

I too think that D would be a great first language.  I learned Pascal when getting my CIS degree and loved it.  How in the world do you teach pointers and trees and other such structures using Java?.

My nine year old son is learning VB, but maybe I should switch him over to D. We are writing a puzzle game together and it looks like either DWT or DFL are far enough along to do the GUI parts.  In a couple of years he will probably be out programming me.  Kids suck up information like a sponge.

Oh, yea.   I too like the   :D  symbol....especially in reversed text.

Tom J


March 21, 2006
Here is about the only point at which I disagree.  I learned QuickBASIC as my very first language, back quite some years ago.

Today I have a rather low opinion of that language and of BASIC in general.  Really, a bias.  I learned a lot of things back then - memory management (64k of string memory was rough), how great XMS used to be, why Assembler rocked, what the use of optimization was, etc.

My "mother tongue" in programming is nothing like QuickBASIC.  I tried to program some in it recently, and ASP more recently, and it was slow goings.  C is what I really latched onto.  Perl, PHP, C++, D, and other languages all feel the same.

Even so, I think QuickBASIC was a good first language for me.  I'm not comparing it to D here, but I'm just saying that the first language and the "mother tongue" language need not be the same.

In other words, even for Java programmers... learning D first might be better.  Then again, they might not ever actually be able to become Java programmers after that.

Still, having trials and tribulations... having to deal with limitations that suck, speed that is second rate... it helps.  I work in interactive media, and the good Flash/ActionScript programmers are often those who had to deal with Flash 5, from what I've seen.  Flash 5 was slow.  Flash 5 was limited.  Flash 8 is so much better.  But Flash 5 taught you what not to do.

Just my opinion.

-[Unknown]


>  - while knowing several programming languages right from the first year is considered a forte, some teachers forget that *one* language that the students *feel* their own [like a mother tongue], is rather important if one is to entertain a life long understanding, comfortability and handiness with programming as such
March 21, 2006
In article <dvn3fd$q65$1@digitaldaemon.com>, Walter Bright says...
>
>
[...]
>
>This portability isn't the result of a VM, it's the result of cleaning up all the undefined and implementation defined behaviors in the language.

I still think the VM has its own part. Think to having backends for IA32, IA64, AMD64, PowerPC, SPARC, ARM and so on. They will have their bugs and special cases acording to the underlying architecture.

The "compile once and run everywhere" thing for Java is literally true.

>D is about halfway in between C++ and Java in this regard. It could be better.

Sure, this will make D highly portable.
But I think the VM will win anyway. Because I am lazy.
I don't want to buy/download, install and test 4 different (cross-)compilers for
my 4 systems. And I don't want to compile my program 4 times.
If one compiler can do it, with acceptable performance, I will use the
one-compiler solution.

I think there are three categories:

- Scripting languages, for quick tricks (Python, Ruby)
- VM-based languages, for maximum portability (Java, C#)
- CPU-compiled languages, for maximum efficency (D, C++, C)

And there is enough space for all.

Ciao

---
http://www.mariottini.net/roberto/
March 21, 2006
Hasan Aljudy wrote:

> All we need is for the compiler to silently insert "import std.stdio;"

No, we really really don't want that.

We already have it silently inserting parts of std.c.stdio and it sucks.

> And .. a book, of course! 

That would be very nice to have, yes.

Especially if there was one that was under an open publication license ?

--anders
March 21, 2006
Georg Wrede wrote:

> Hmm. Compared with D "Hello World", I'm getting worried.

D programs are bigger than C and Java, but smaller than C++ ?
Here are some old Hello test results I had: (on Mac OS X 10.3)

31b     hello.sh (script)
Hello, World!
        0.01 real         0.00 user         0.00 sys

 12K    hello_c (executable)
Hello, World!
        0.03 real         0.00 user         0.00 sys

368K    hello_cpp (including libstdc++)
Hello, World!
        0.09 real         0.00 user         0.02 sys

104K    hello_d (including Phobos)
Hello, World!
        0.04 real         0.01 user         0.01 sys

637b    hello.jar (archive)
Hello, World!
        0.66 real         0.38 user         0.19 sys

Results for C, C++, D, Java 1.4 and Bourne Shell respectively...
If the Java runtime comes with the system, Java's really small !
(then again, it's also the far slowest to start up and execute
which makes it less suitable for small programs like this one)


BTW:
Having a programming language that needs separate compilation
as a first language is pretty mean I think. But that's just me.
(better to go with a scripting language, such as Ruby or Python ?
and it avoids having to unlearn things picked up from Pascal...)

But I learned Pascal in school, and Ada in university. Hated both. :)
I think you need to learn at least three languages. Preferrably more.

--anders


PS.

#!/bin/sh
echo "Hello, World!"

-----------------------------------------
#include <stdio.h>

int main(int argc, char *argv[])
{
    puts("Hello, World!");
    return 0;
}

-----------------------------------------
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    cout << "Hello, World!" << endl;
    return 0;
}

-----------------------------------------
import std.stdio;

void main()
{
    writeln("Hello, World!");
}

-----------------------------------------
public class hello
{
  public static void main(String[] args)
  {
    System.out.println("Hello, World!");
  }
}
March 21, 2006
tjohnson [at] prtsoftware . com wrote:

> I too think that D would be a great first language.  I learned Pascal when
> getting my CIS degree and loved it.  How in the world do you teach pointers and
> trees and other such structures using Java?.  

All objects are pointers in Java, so I don't think that would be hard...

--anders
March 21, 2006
Walter Bright skrev:
> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"

Apart from the reasons others have mentioned, I would just like to add:

Expressiveness

-- an area where I think D has far surpassed Java and even C++ and is closing up on the more popular scripting languages.

/Oskar