March 11, 2006
Thomas Kuehne wrote:
> 
> I just love C#:
> 
>> class NamingOnTheRocks{
>>    static int @if(int @while){
>>        return @while * @while;
>>    }
>>
>>    public static int Main(string[] args){
>>        int @return;
>>        int @static = 3, @switch = 8, @break = 2, @case = 3, @true = 0;
>>
>>        if(@if(@switch + @break) * @case != @true){
>>            @return = @static;
>>        }else{
>>            @return = @break / @static;
>>        }
>>
>>        return @return * 2;
>>    }
>> }
> 
> No joke - this is valid C# !

What a wonderful language :-p  What does the '@' represent?


Sean
March 12, 2006
Sean Kelly schrieb am 2006-03-11:
> Thomas Kuehne wrote:
>> 
>> I just love C#:
>> 
>>> class NamingOnTheRocks{
>>>    static int @if(int @while){
>>>        return @while * @while;
>>>    }
>>>
>>>    public static int Main(string[] args){
>>>        int @return;
>>>        int @static = 3, @switch = 8, @break = 2, @case = 3, @true = 0;
>>>
>>>        if(@if(@switch + @break) * @case != @true){
>>>            @return = @static;
>>>        }else{
>>>            @return = @break / @static;
>>>        }
>>>
>>>        return @return * 2;
>>>    }
>>> }
>> 
>> No joke - this is valid C# !
>
> What a wonderful language :-p  What does the '@' represent?

@ indicates an identifier following: "int @x;" and "int x;" are identical. As a consequence you can write "int @some_keyword;" while you can't write "int some_keyword;".

Thomas

March 12, 2006
MicroWizard wrote:

>>My general experience with people who say "D is a great language, but I won't use it because of <minor nitpick> because <minor nitpick> is the most important thing in the world" is that they won't use it anyway, and are just looking for an excuse.
> 
> Absolutely agree.
> I have told to many "friends" to check D site and tell me their opinions.
> Most of them had excuses: no IDE, no GUI, no ... bla-bla-bla
> And they use Visual Studio with Intellisense and such crap.
> 
> (I use DMD as regular compiler for small inhouse projects for two years.
> And I really like it.)
> 
> D is not for every "code writer", it is for developers.
> 
> Tamas Nagy
The "no GUI" really *IS* a valid reason, not just an excuse.  It depends on what your project is.  I currently have two projects in mind.  For one of them I may choose D, for the other...no stable GUI is a project killer.

N.B.:  This is not unique to D.  Every new language comes to this problem, which may be condensed into a simple word:  LIBRARIES!!!  This is why a GOOD connection to C is so important to D.  (And it's why an automated build tool that can add C code and D code together is important.)  In the early days I remember a comment where Walter was looking at adding an automatic conversion of C header files into D files ... and decided that it was too difficult a job to do in a general way.  (He also pointed at his C or C++ [I forget which] compiler, and showed how to use it as a preprocessor...which didn't help me as I'm using Linux, but demonstrated that he DID understand the problem.)

Actually, a version of this is why I've chosen Python over Ruby for some projects.  I think that Ruby is a much better language, but Python started earlier, so Python has the libraries.

This is a serious problem, and I don't know any way to solve it.  It can "sort of" be handled by just continuing on, and developing libraries in passing.  Over time the most critical libraries will be added.  But note that Ruby is STILL severely behind Python.  This is not a problem that can be handled quickly in this way.   A solution would dissolve the problem by allowing transparent access to, e.g., C libraries.  (Even this wouldn't be a total solution, because then there will be the problem of documentation...where the documentation for the libraries will all be directed at users of the original language.)  This is probably a problem that we must be satisfied with handling rather than solving.  Over time it will decrease in importance.  Currently, while the GUI and database libraries are missing/primitive/fragile ... well, a lot of the time D won't be the correct language, even though as a language it would be the correct choice.

-- 
Work in progress
March 12, 2006
Sorry, but I feel you missed the point.

No language was born _with_ libraries. Not M$ ones.
Who want to use D imediately he/she is a coder, not a developer,
who tries to use the possibilities.

In my professional life I have to work with M$ things. That place I am a coder only. I satisfy customer's needs. I use RAD. I earn money. I often hate it.

In this community I can see the possibility to participate in some good new things to create. It needs time to grow. No reason to hurry.

Tamas Nagy

In article <dv243r$1qa$1@digitaldaemon.com>, Charles Hixson says...
>
>MicroWizard wrote:
>
>>>My general experience with people who say "D is a great language, but I won't use it because of <minor nitpick> because <minor nitpick> is the most important thing in the world" is that they won't use it anyway, and are just looking for an excuse.
>> 
>> Absolutely agree.
>> I have told to many "friends" to check D site and tell me their opinions.
>> Most of them had excuses: no IDE, no GUI, no ... bla-bla-bla
>> And they use Visual Studio with Intellisense and such crap.
>> 
>> (I use DMD as regular compiler for small inhouse projects for two years.
>> And I really like it.)
>> 
>> D is not for every "code writer", it is for developers.
>> 
>> Tamas Nagy
>The "no GUI" really *IS* a valid reason, not just an excuse.  It depends on what your project is.  I currently have two projects in mind.  For one of them I may choose D, for the other...no stable GUI is a project killer.
>
>N.B.:  This is not unique to D.  Every new language comes to this problem, which may be condensed into a simple word:  LIBRARIES!!!  This is why a GOOD connection to C is so important to D.  (And it's why an automated build tool that can add C code and D code together is important.)  In the early days I remember a comment where Walter was looking at adding an automatic conversion of C header files into D files ... and decided that it was too difficult a job to do in a general way.  (He also pointed at his C or C++ [I forget which] compiler, and showed how to use it as a preprocessor...which didn't help me as I'm using Linux, but demonstrated that he DID understand the problem.)
>
>Actually, a version of this is why I've chosen Python over Ruby for some projects.  I think that Ruby is a much better language, but Python started earlier, so Python has the libraries.
>
>This is a serious problem, and I don't know any way to solve it.  It can "sort of" be handled by just continuing on, and developing libraries in passing.  Over time the most critical libraries will be added.  But note that Ruby is STILL severely behind Python.  This is not a problem that can be handled quickly in this way.   A solution would dissolve the problem by allowing transparent access to, e.g., C libraries.  (Even this wouldn't be a total solution, because then there will be the problem of documentation...where the documentation for the libraries will all be directed at users of the original language.)  This is probably a problem that we must be satisfied with handling rather than solving.  Over time it will decrease in importance.  Currently, while the GUI and database libraries are missing/primitive/fragile ... well, a lot of the time D won't be the correct language, even though as a language it would be the correct choice.
>
>-- 
>Work in progress


March 13, 2006
Charles Hixson wrote:
> MicroWizard wrote:
> 
>>> My general experience with people who say "D is a great language, but I
>>> won't use it because of <minor nitpick> because <minor nitpick> is the
>>> most important thing in the world" is that they won't use it anyway, and
>>> are just looking for an excuse.
>> Absolutely agree.
>> I have told to many "friends" to check D site and tell me their opinions.
>> Most of them had excuses: no IDE, no GUI, no ... bla-bla-bla
>> And they use Visual Studio with Intellisense and such crap.
>>
>> (I use DMD as regular compiler for small inhouse projects for two years.
>> And I really like it.)
>>
>> D is not for every "code writer", it is for developers.
>>
>> Tamas Nagy
> The "no GUI" really *IS* a valid reason, not just an excuse.  It depends on
> what your project is.  I currently have two projects in mind.  For one of
> them I may choose D, for the other...no stable GUI is a project killer.
> 
> N.B.:  This is not unique to D.  Every new language comes to this problem,
> which may be condensed into a simple word:  LIBRARIES!!!  This is why a
> GOOD connection to C is so important to D.  (And it's why an automated
> build tool that can add C code and D code together is important.)  In the
> early days I remember a comment where Walter was looking at adding an
> automatic conversion of C header files into D files ... and decided that it
> was too difficult a job to do in a general way.  (He also pointed at his C
> or C++ [I forget which] compiler, and showed how to use it as a
> preprocessor...which didn't help me as I'm using Linux, but demonstrated
> that he DID understand the problem.)
> 
> Actually, a version of this is why I've chosen Python over Ruby for some
> projects.  I think that Ruby is a much better language, but Python started
> earlier, so Python has the libraries.
> 
> This is a serious problem, and I don't know any way to solve it.  It can
> "sort of" be handled by just continuing on, and developing libraries in
> passing.  Over time the most critical libraries will be added.  But note
> that Ruby is STILL severely behind Python.  This is not a problem that can
> be handled quickly in this way.   A solution would dissolve the problem by
> allowing transparent access to, e.g., C libraries.  (Even this wouldn't be
> a total solution, because then there will be the problem of
> documentation...where the documentation for the libraries will all be
> directed at users of the original language.)  This is probably a problem
> that we must be satisfied with handling rather than solving.  Over time it
> will decrease in importance.  Currently, while the GUI and database
> libraries are missing/primitive/fragile ... well, a lot of the time D won't
> be the correct language, even though as a language it would be the correct
> choice.

I completely agree with this. I think the language is good enough now that future progress will be limited by the quality of the libraries.
The most severe symptom is that right now, D doesn't even have proper windows headers!
IMHO, it's not currently suitable for anything that involves I/O other than reading and writing files.

The 'implib' tool has done a lot to improve the situation with respect to C libraries -- now at least we can link to them. We just need a header file converter.

I've been trying to understand the 'problem space' for C -> D header conversion. It seems to me, that it is a solvable problem, once you accept that because of ambiguities in the C preprocessor, a fully automatic conversion is impossible. My proposed solution is to have a prepreprocessor, which modifies a C header into a format without ambiguities, which can then be converted automatically.
I think that if we had such a tool, D would be vastly more usable.
I think this issue is about to become 'mission critical' for D.
March 13, 2006
Don Clugston wrote:

> The most severe symptom is that right now, D doesn't even have proper windows headers!

But if you're not programming for Windows, that is not a problem... :-)

--anders
March 13, 2006
Anders F Björklund wrote:
> Don Clugston wrote:
> 
>> The most severe symptom is that right now, D doesn't even have proper windows headers!
> 
> But if you're not programming for Windows, that is not a problem... :-)

True -- that's why I called it a symptom. The situation is no better for Linux, and seems like the Mac guys don't even have a compiler...
> 
> --anders
March 13, 2006
Don Clugston wrote:

>>> The most severe symptom is that right now, D doesn't even have proper windows headers!
>>
>> But if you're not programming for Windows, that is not a problem... :-)
> 
> True -- that's why I called it a symptom. The situation is no better for Linux, and seems like the Mac guys don't even have a compiler...

But is that a language problem ? Other than that D deliberately chose to not be read-compatible with C headers, or linkable with C++ libraries ?


We all agree that a C-header-to-D-import module tool would be useful,
I think Walter even noted that on the DMD compiler page from the start.

But when I've translated the headers, the rest seems to be working...
Except for templates of course, but that's "just a Mac problem" eh ?


Just think that there are bigger bugs with Phobos than just missing
some Windows headers or having incomplete headers for the C stdlib...

I have a library here that I can compare implementations for, and out of C++ and Objective-C and now D - the D version is the neatest one by far!

--anders
March 13, 2006
Anders F Björklund wrote:
> Don Clugston wrote:
> 
>>>> The most severe symptom is that right now, D doesn't even have proper windows headers!
>>>
>>> But if you're not programming for Windows, that is not a problem... :-)
>>
>> True -- that's why I called it a symptom. The situation is no better for Linux, and seems like the Mac guys don't even have a compiler...
> 
> But is that a language problem ? Other than that D deliberately chose to not be read-compatible with C headers, or linkable with C++ libraries ?

No, but it is a practical problem, which makes it hard to justify the use of D.

> We all agree that a C-header-to-D-import module tool would be useful,
> I think Walter even noted that on the DMD compiler page from the start.
> 
> But when I've translated the headers, the rest seems to be working...
> Except for templates of course, but that's "just a Mac problem" eh ?
> 
> Just think that there are bigger bugs with Phobos than just missing
> some Windows headers or having incomplete headers for the C stdlib...

I didn't intend to imply that there were no other symptoms... <g>

> I have a library here that I can compare implementations for, and out of C++ and Objective-C and now D - the D version is the neatest one by far!

You're preaching to the converted <g>.

Right now we have a world-beating language, that's totally embarrassed about the state of its libraries (the IDE is a minor issue in comparison). It's a genuine, serious problem. It might not be too hard to fix, but that doesn't stop it from being a blocker right now.
March 13, 2006
Don Clugston wrote:

>> I have a library here that I can compare implementations for, and out of C++ and Objective-C and now D - the D version is the neatest one by far!
> 
> You're preaching to the converted <g>.

What I meant was that even without a good std library, it's still ahead.
(The C++ version was using Carbon, and the Objective-C was using Cocoa)

I guess that's a side-effect of the "don't do in a standard library what can be done in the compiler", which seems to be a part of D philosophy ?

> Right now we have a world-beating language, that's totally embarrassed about the state of its libraries (the IDE is a minor issue in comparison). It's a genuine, serious problem. It might not be too hard to fix, but that doesn't stop it from being a blocker right now.

I wrapped my own "showstopper" libraries, so those weren't really it...
I've found that people invent other reasons, to not have to look at D ?

The good part is that "C" libraries can be used by all three languages.
(the bad of course being that I then need to code the whole thing in C)

--anders