digitalmars.D.learn - Dlang seems like java now,but why not let d more like C# Style?
- dnewer (8/8) Mar 14 2015 yes,java is good lang,but i dont think it's better than c#,if no
- dnewer (4/12) Mar 14 2015 An other one is C# must rely on the CLR. but I prefer like Delphi
- bearophile (4/5) Mar 14 2015 Soon you will be able to compile C# natively.
- dnewer (6/11) Mar 14 2015 i know some thing about .net native.
- ketmar (2/4) Mar 14 2015 and you just don't need to write drivers.=
- Craig Dillabaugh (12/20) Mar 14 2015 What has led you to this conclusion? I don't personally find D
- Ellery Newcomer (13/21) Mar 14 2015 I've been using C# pretty extensively for the last year or so.
- weaselcat (3/5) Mar 14 2015 what does LINQ offer that UFCS-style functional programming does
- Ellery Newcomer (12/18) Mar 14 2015 LINQ basically is a UFCS-style api. AST reflection is what makes
- Meta (9/28) Mar 14 2015 Somewhat off-topic, but you could theoretically embed SQL
- Idan Arye (14/33) Mar 15 2015 Even if we can't get the lambdas as syntax tress, the fact that
- dnewer (7/46) Mar 15 2015 i dont think linq is good.(its make C# bloated, huge, slow!)
- Kagamin (4/6) Mar 15 2015 U++ approach will probably give more succinct result. Not sure
- Ellery Newcomer (7/16) Mar 16 2015 There are limitations on operator overloading that make it much
- Idan Arye (5/23) Mar 16 2015 I don't think the problem is the lack of pattern matching. I
- Israel (5/30) Mar 16 2015 You should give C# a try, its actually great. The only thing that
- Idan Arye (2/10) Mar 15 2015 More like C#? How? Convert all names to PascalCase?
- Kagamin (3/7) Mar 15 2015 Not sure what do you mean. D has classes, interfaces and foreach,
oracle or google support java will less and less. (runs), stronger (system-level, driving level)
Mar 14 2015
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
On Saturday, 14 March 2015 at 10:04:15 UTC, bearophile wrote:dnewer:i know some thing about .net native. but its too late.i dont think microsoft will rranslate all libiary to native.Bye, bearophile
Mar 14 2015
On Sat, 14 Mar 2015 10:08:23 +0000, dnewer wrote:and you just don't need to write drivers.=
Mar 14 2015
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
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, Craigtowards 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
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
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: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.fricken awesome.what does LINQ offer that UFCS-style functional programming does not?
Mar 14 2015
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: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') };On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote: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.fricken awesome.what does LINQ offer that UFCS-style functional programming does not?
Mar 14 2015
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: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.On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote: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.fricken awesome.what does LINQ offer that UFCS-style functional programming does not?
Mar 15 2015
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: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.On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat 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. 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.On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote: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.fricken awesome.what does LINQ offer that UFCS-style functional programming does not?
Mar 15 2015
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
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
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: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.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..
Mar 16 2015
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
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: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.aspxI 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
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.aspxConceptually 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
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:holds me back is that its maintained by microsoft, Multi Platform support is sub par, and it cant be targeted towards other architectures.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, Craigtowards OO than D. the one area where I've wished for some of D's functionality. Reflection is all runtime. fricken awesome.
Mar 16 2015
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
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