Why Strings as Classes?

bearophile bearophileHUGS at lycos.com
Mon Aug 25 19:25:37 PDT 2008


Benji Smith:
> Yep, I like C# a lot. I think it's very well-designed, with the language 
> and libraries dovetailing nicely together.

In the past I have said that C# 3.5/4 has some small ideas that D may enjoy copying. But probably having a complex coherent OOP structure from the bottom up isn't one of them. You must understand that D is lower level than C#, it means it's designed for people that like to suffer more :-) D is designed mostly for people coming from C and C++, and it must be fit to be used procedurally/functionally without any OOP too.

So D isn't C# and this means what you ask isn't much fit for it. Note that the situation isn't set in stone: time ago for example there was a person willing to program like in Python on the dot net platform, unhappy with C#. He has created the Boo language. It's not widespread, and it has few small design mistakes, but overall it's not a bad language, it's quite usable for its purposes. So you can create your language fit for your purposes... Do you know the Vala language? It looks like C#, but compiles to C... it's probably in beta stage still, but it may be closer to your dream language.

Another approach you may follow is to reinvent just the standard library/runtime of D to make it look more like the C# you like :-) Seeing it from outside, Tango too seems already closer to the Java std lib more than Phobos (but I may be wrong). I like Python, so I am writing a large lib that no one else uses that has partially the purpose of making D look like Python :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list