Chapel vs D

via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 27 04:03:13 PST 2014


On Friday, 26 December 2014 at 18:16:59 UTC, Israel wrote:
> I came from the Microsoft world and C# and the one thing i miss
> is my Compound worded syntax with capital letters like
> GetCurrentDirectory() whereas in D it looks like thisExe()
>
> Same with how we deal with other syntax situations like input.
> In C# i would use something like:
>
> int ThisNumber;
> ThisNumber = Console.ReadLine();
>
> in D it looks worse with its "old" way of doing it:
>
> int thisNumber
> readf("%s", &thisNumber);

I agree that C# libraries have a more friendly syntax which also 
is geared towards autocompletion in the editor. Fortunately using 
phobos is optional, so I am more concerned about the core 
language syntax and how it expresses the desirable semantics.

E.g. Chapel has typed tuples expressed as simple parentheses. 
Tuples are convenient, but only if the syntax is the standard 
lightweight notation. A library hack is not sufficient, since 
tuples are usually used as a lightweight replacement for structs 
and lists.

The current D syntax cannot absorb more features without a 
redesign, and some features should be inverted.  It would make 
sense to look at what other languages provide in terms of 
features and how they allow programmers to express it in the 
language syntax.


More information about the Digitalmars-d mailing list