www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dlang seems like java now,but why not let d more like C# Style?

reply "dnewer" <mir3email gmail.com> writes:

oracle or google support java will less and less.






(runs), stronger (system-level, driving level)
Mar 14 2015
next sibling parent "dnewer" <mir3email gmail.com> writes:
On Saturday, 14 March 2015 at 09:59:05 UTC, dnewer wrote:

 no oracle or google support java will less and less.






 (runs), stronger (system-level, driving level)
that will need to be compiled into the exe or DLL. so!hope D Lang is a good Select!
Mar 14 2015
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
dnewer:


Bye, bearophile
Mar 14 2015
parent reply "dnewer" <mir3email gmail.com> writes:
On Saturday, 14 March 2015 at 10:04:15 UTC, bearophile wrote:
 dnewer:


Bye, bearophile
i know some thing about .net native. but its too late.i dont think microsoft will rranslate all libiary to native.
Mar 14 2015
parent ketmar <ketmar ketmar.no-ip.org> writes:
On Sat, 14 Mar 2015 10:08:23 +0000, dnewer wrote:



and you just don't need to write drivers.=
Mar 14 2015
prev sibling next sibling parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Saturday, 14 March 2015 at 09:59:05 UTC, dnewer wrote:

 no oracle or google support java will less and less.






 (runs), stronger (system-level, driving level)
What has led you to this conclusion? I don't personally find D very much like Java. It definitely doesn't push OO design on you like Java (even where it isn't needed), and code is much more concise in my experience. I also find D very much more flexible. Anyway, this isn't a criticism of your comment, I was just curious what (other than the shared C++ syntax heritage) you find so Java-like in D? Cheers, Craig
Mar 14 2015
parent reply "Ellery Newcomer" <ellery-newcomer utulsa.edu> writes:
On Saturday, 14 March 2015 at 13:52:13 UTC, Craig Dillabaugh 
wrote:


 similarities.

 Anyway, this isn't a criticism of your comment, I was just 
 curious what (other than the shared C++ syntax heritage) you 
 find so Java-like in D?

 Cheers,

 Craig
towards OO than D. the one area where I've wished for some of D's functionality. Reflection is all runtime. fricken awesome.
Mar 14 2015
next sibling parent reply "weaselcat" <weaselcat gmail.com> writes:
On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote:

 fricken awesome.
what does LINQ offer that UFCS-style functional programming does not?
Mar 14 2015
parent reply "Ellery Newcomer" <ellery-newcomer utulsa.edu> writes:
On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat wrote:
 On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer 
 wrote:

 fricken awesome.
what does LINQ offer that UFCS-style functional programming does not?
LINQ basically is a UFCS-style api. AST reflection is what makes it nice. consider: X.Where(x => x.Members.Count() == x.Admins.Count()) type. When X is a table in a database, things get tricky for D. so the implementation of X can reflect over the body of the lambda and use it to generate the appropriate SQL. ORMs such as entity framework and nhibernate do this now.
Mar 14 2015
next sibling parent "Meta" <jared771 gmail.com> writes:
On Sunday, 15 March 2015 at 00:56:24 UTC, Ellery Newcomer wrote:
 On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat wrote:
 On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer 
 wrote:

 fricken awesome.
what does LINQ offer that UFCS-style functional programming does not?
LINQ basically is a UFCS-style api. AST reflection is what makes it nice. consider: X.Where(x => x.Members.Count() == x.Admins.Count()) container type. When X is a table in a database, things get tricky for D. type), so the implementation of X can reflect over the body of the lambda and use it to generate the appropriate SQL. ORMs such as entity framework and nhibernate do this now.
Somewhat off-topic, but you could theoretically embed SQL directly in your D code using string mixins and have it statically checked at compile time (this would be pretty advanced usage, though). mixin SQL!q{ INSERT INTO Person(name, age, occupation) VALUES ('John', 25, 'Programmer') };
Mar 14 2015
prev sibling parent reply "Idan Arye" <GenericNPC gmail.com> writes:
On Sunday, 15 March 2015 at 00:56:24 UTC, Ellery Newcomer wrote:
 On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat wrote:
 On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer 
 wrote:

 fricken awesome.
what does LINQ offer that UFCS-style functional programming does not?
LINQ basically is a UFCS-style api. AST reflection is what makes it nice. consider: X.Where(x => x.Members.Count() == x.Admins.Count()) container type. When X is a table in a database, things get tricky for D. type), so the implementation of X can reflect over the body of the lambda and use it to generate the appropriate SQL. ORMs such as entity framework and nhibernate do this now.
Even if we can't get the lambdas as syntax tress, the fact that we can send whatever types we want to the delegates and overload operators and stuff means we can still convert the lambdas into SQL. Here is a very crude, very basic example: http://dpaste.dzfl.pl/94d851d7ca63. An enterprise implementation implementation. The whole special-syntax to functional-style to syntax-tree to SQL is too overcomplicated - a simply lisp-style macro system(like what they have in Scala or Rust) could have done the trick in a simpler and faster way.
Mar 15 2015
next sibling parent "dnewer" <mir3email gmail.com> writes:
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
 On Sunday, 15 March 2015 at 00:56:24 UTC, Ellery Newcomer wrote:
 On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat wrote:
 On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer 
 wrote:

 fricken awesome.
what does LINQ offer that UFCS-style functional programming does not?
LINQ basically is a UFCS-style api. AST reflection is what makes it nice. consider: X.Where(x => x.Members.Count() == x.Admins.Count()) container type. When X is a table in a database, things get tricky for D. type), so the implementation of X can reflect over the body of the lambda and use it to generate the appropriate SQL. ORMs such as entity framework and nhibernate do this now.
Even if we can't get the lambdas as syntax tress, the fact that we can send whatever types we want to the delegates and overload operators and stuff means we can still convert the lambdas into SQL. Here is a very crude, very basic example: http://dpaste.dzfl.pl/94d851d7ca63. An enterprise implementation will be much bigger and much more complicated - The whole special-syntax to functional-style to syntax-tree to SQL is too overcomplicated - a simply lisp-style macro system(like what they have in Scala or Rust) could have done the trick in a simpler and faster way.
i think just class library structure,and class library IntelliSense! Take its essence to the dregs! D language has its own characteristics, such as the lower.Should be maintained and developed.
Mar 15 2015
prev sibling next sibling parent "Kagamin" <spam here.lot> writes:
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
 Here is a very crude, very basic example: 
 http://dpaste.dzfl.pl/94d851d7ca63.
U++ approach will probably give more succinct result. Not sure how it fares against D philosophy: does it replace range primitives with whole new thing?
Mar 15 2015
prev sibling parent reply "Ellery Newcomer" <ellery-newcomer utulsa.edu> writes:
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
 Even if we can't get the lambdas as syntax tress, the fact that 
 we can send whatever types we want to the delegates and 
 overload operators and stuff means we can still convert the 
 lambdas into SQL.
There are limitations on operator overloading that make it much less likely you can use the exact same lambdas for collections and sql. Bad for testability.

 The whole special-syntax to functional-style to syntax-tree to 
 SQL is too overcomplicated - a simply lisp-style macro 
 system(like what they have in Scala or Rust) could have done 
 the trick in a simpler and faster way.
overcomplicated? probably - it's microsoft. And any time I have to manipulate the ASTs I find myself wishing for a language with
Mar 16 2015
parent reply "Idan Arye" <GenericNPC gmail.com> writes:
On Monday, 16 March 2015 at 12:18:42 UTC, Ellery Newcomer wrote:
 On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
 Even if we can't get the lambdas as syntax tress, the fact 
 that we can send whatever types we want to the delegates and 
 overload operators and stuff means we can still convert the 
 lambdas into SQL.
There are limitations on operator overloading that make it much less likely you can use the exact same lambdas for collections and sql. Bad for testability.

 The whole special-syntax to functional-style to syntax-tree to 
 SQL is too overcomplicated - a simply lisp-style macro 
 system(like what they have in Scala or Rust) could have done 
 the trick in a simpler and faster way.
overcomplicated? probably - it's microsoft. And any time I have to manipulate the ASTs I find myself wishing for a language regards..
I don't think the problem is the lack of pattern matching. I think the problem is that by forcing the query syntax into lambda expression syntax, you obfuscate the syntax tree without really gaining any value.
Mar 16 2015
parent reply "Kagamin" <spam here.lot> writes:
On Monday, 16 March 2015 at 13:24:28 UTC, Idan Arye wrote:
 I don't think the problem is the lack of pattern matching. I 
 think the problem is that by forcing the query syntax into 
 lambda expression syntax, you obfuscate the syntax tree without 
 really gaining any value.
Where takes a delegate because that's how it works: https://msdn.microsoft.com/en-us/library/vstudio/system.linq.enumerable.where.aspx
Mar 17 2015
parent reply "Idan Arye" <GenericNPC gmail.com> writes:
On Tuesday, 17 March 2015 at 10:07:19 UTC, Kagamin wrote:
 On Monday, 16 March 2015 at 13:24:28 UTC, Idan Arye wrote:
 I don't think the problem is the lack of pattern matching. I 
 think the problem is that by forcing the query syntax into 
 lambda expression syntax, you obfuscate the syntax tree 
 without really gaining any value.
Where takes a delegate because that's how it works: https://msdn.microsoft.com/en-us/library/vstudio/system.linq.enumerable.where.aspx
The version of where that works on .NET objects takes a delegate - but the version used to generate SQL takes an `Expression` - https://msdn.microsoft.com/en-us/library/vstudio/bb535040%28v=vs.110%29.aspx
Mar 17 2015
parent "Kagamin" <spam here.lot> writes:
On Tuesday, 17 March 2015 at 14:14:19 UTC, Idan Arye wrote:
 The version of where that works on .NET objects takes a 
 delegate - but the version used to generate SQL takes an 
 `Expression` - 
 https://msdn.microsoft.com/en-us/library/vstudio/bb535040%28v=vs.110%29.aspx
Conceptually Where takes a delegate, which takes an element and returns bool indicating whether the element should pass to the next stage. That's how its semantics is defined.
Mar 17 2015
prev sibling parent "Israel" <tl12000 live.com> writes:
On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote:
 On Saturday, 14 March 2015 at 13:52:13 UTC, Craig Dillabaugh 
 wrote:


 similarities.

 Anyway, this isn't a criticism of your comment, I was just 
 curious what (other than the shared C++ syntax heritage) you 
 find so Java-like in D?

 Cheers,

 Craig
towards OO than D. the one area where I've wished for some of D's functionality. Reflection is all runtime. fricken awesome.
holds me back is that its maintained by microsoft, Multi Platform support is sub par, and it cant be targeted towards other architectures.
Mar 16 2015
prev sibling next sibling parent "Idan Arye" <GenericNPC gmail.com> writes:
On Saturday, 14 March 2015 at 09:59:05 UTC, dnewer wrote:

 no oracle or google support java will less and less.






 (runs), stronger (system-level, driving level)
Mar 15 2015
prev sibling parent "Kagamin" <spam here.lot> writes:
On Saturday, 14 March 2015 at 09:59:05 UTC, dnewer wrote:

 no oracle or google support java will less and less.


Not sure what do you mean. D has classes, interfaces and foreach,
Mar 15 2015