October 18, 2017
On Tuesday, 17 October 2017 at 09:24:39 UTC, Dukc wrote:
> On Monday, 16 October 2017 at 00:25:32 UTC, codephantom wrote:
>> Is philosophy not important?
>
> I think that if somebody wants to nail down a philosophy for D, the main page puts it well: "The best paradigm is to not impose something at the expense of others". I also heard that long ago there was a phrase "D is not a religion". I wasn't myself here then but it still describes D alot.
>
> Well, I quess other phrases could also be included it, like "ultimate performance must be attainable, but if the way for it is otherwise undesirable it should be explicit" but the point is that D tries to let you to program in any style it technically can. With that "technically can" I mean that it does not support logic programming for example because it would require too great a rework on implementation and language spec.
>
> This is in contrast to Java and C# which almost force you to use object-oriented styles, and Python whose philosophy is "there should be one, and preferably only one clear way to do a thing". C++ and Forth are examples of languages which share that philosophy of D.

Again, philosophy != religion. Why do these terms get confused so much?

One tries to make sense of things using 'reason', the other does not (i.e religion is based on faith - which you can't reason about).

Religion can be imposed, philosophy cannot be imposed - because one is always free to reason about it.

The philosophy of unix is to have a minimalist, modular approach to software development (even if that's not always the case - because it can't be imposed).

The philosophy of C is that the programmer knows best (even if that's not always the case - because it can't be imposed).

GPL is more a religion that a philosophy - because it seeks to always impose (oops....should I have said that...)

The D language certainly does *not* have a religion, but it does have a philosophy....whether it knows it or not...

In my efforts trying to 'make sense' of the D language, I can't help but think that its philosophy almost certainly incorporates the concept of:

"freedom ~ for programmers".

Hey...perhaps that's it!

(even if that's not always the case - because it can't be imposed).

October 18, 2017
On Wednesday, 18 October 2017 at 00:05:06 UTC, codephantom wrote:
> Again, philosophy != religion. Why do these terms get confused so much?

I didn't mean they would be. I think that "D is not a religion" means that whatever philosophy it has it is not cast in stone. Not that it has no philosophy.

Like you said, a certain kind of freedom is probably 1# in D philosophy but that does not mean it's the only part. Other thinkgs I could think of for example:

-Let the programmer take charge, but make sure he's aware of it when doing so.

-In "normal" code, first safety, then correctness, then performance, then expressiveness. Allow the user to shuffle this order but don't encourage it.

-Don't strive for absolute minimalism, but aim for, in Alexandrescus words, "power-to-weight-ratio".
October 18, 2017
On Tuesday, 17 October 2017 at 09:24:39 UTC, Dukc wrote:
> This is in contrast to Java and C# which almost force you to use object-oriented styles

I don't think C# force you to use object oriented modelling? Clearly the GC and the standard library skews what you end up doing.

> and Python whose philosophy is "there should be one, and preferably only one clear way to do a thing".

Ironically there is a plethora of ways to do the same thing in Python, but I guess the StackOverflow discussions tends to be about what the proper way is.

So discussions about idiomatic Python is mostly cultural and not so much the language itself. There is also quite a bit of discussion about what is idiomatic D in these forums. So not all that different.


> C++ and Forth are examples of languages which share that philosophy of D.

I don't see how Forth is comparable. Forth is essentially a minimalistic VM. So I think Lisp would be a better pairing for Forth. Both are at the other side of the spectrum of C++/D.

I don't think there is much of a clear philosophy behind D:

C++ with GC, a slightly less verbose syntax, minus templating and some other things, then a bit of Java/C#, and finally a slightly different version of templating added. The standard library borrows conceptually from C++ and Python.

How is the philosophy different from C++, except the GC which is a library feature in C++? The core language design and the production backend is essentially the same. D doesn't have enough libraries to distinguish itself culturally from the C-family either, so…


October 18, 2017
On Monday, 16 October 2017 at 21:04:15 UTC, Moritz Maxeiner wrote:
> "Get it done, but also right"

Just D it

October 18, 2017
On Monday, 16 October 2017 at 13:22:12 UTC, Ali wrote:
> So if I may ... the current philosophy of D enthusiasts should be
> "write code, not blogs"

Haha... :)
October 18, 2017
On Wednesday, 18 October 2017 at 12:40:07 UTC, Andrea Fontana wrote:
> On Monday, 16 October 2017 at 21:04:15 UTC, Moritz Maxeiner wrote:
>> "Get it done, but also right"
>
> Just D it

C#, without the runtime

inspired by the post by satoshi's two cents post
October 18, 2017
On Wednesday, 18 October 2017 at 13:26:52 UTC, Ali wrote:
> On Wednesday, 18 October 2017 at 12:40:07 UTC, Andrea Fontana wrote:
>> On Monday, 16 October 2017 at 21:04:15 UTC, Moritz Maxeiner wrote:
>>> "Get it done, but also right"
>>
>> Just D it
>
> C#, without the runtime
>
> inspired by the post by satoshi's two cents post

And without Microsoft, I hope.
October 19, 2017
On Wednesday, 18 October 2017 at 12:25:57 UTC, Ola Fosheim Grøstad wrote:
> I don't think C# force you to use object oriented modelling? Clearly the GC and the standard library skews what you end up doing.

Perhaps. Well, contrasted to .Net and JVM standard libraries then?

>
> Ironically there is a plethora of ways to do the same thing in Python, but I guess the StackOverflow discussions tends to be about what the proper way is.
>
> So discussions about idiomatic Python is mostly cultural and not so much the language itself. There is also quite a bit of discussion about what is idiomatic D in these forums. So not all that different.

Might be, I have used python hardly at all so can't be sure.

>
>> C++ and Forth are examples of languages which share that philosophy of D.
>
> I don't see how Forth is comparable. Forth is essentially a minimalistic VM. So I think Lisp would be a better pairing for Forth. Both are at the other side of the spectrum of C++/D.
>

In most regards they are very different, yes. But the similarity is that like C++/D, Forth is designed with many different programming styles in mind, instead of paving way primarily for one certain way of working. Probably Lisp too but I know too little of it to confirm.

> I don't think there is much of a clear philosophy behind D:
>
> C++ with GC, a slightly less verbose syntax, minus templating and some other things, then a bit of Java/C#, and finally a slightly different version of templating added. The standard library borrows conceptually from C++ and Python.
>
> How is the philosophy different from C++, except the GC which is a library feature in C++? The core language design and the production backend is essentially the same. D doesn't have enough libraries to distinguish itself culturally from the C-family either, so…

Of course D is very close philosophically to C++, that's what gave it the name in the first place! The main difference is that there's no burden of backwards compatibilty with C/C++, and as proven it's enough of difference for many.

October 19, 2017
On Wednesday, 18 October 2017 at 13:26:52 UTC, Ali wrote:
>
> C#, without the runtime

void main()
{
    assert("C#, without the runtime" == "D"); // assertion failure to stderr
}

October 24, 2017
Combine C and Java.