Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 18:48:52 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 18:44:44 UTC, Ola Fosheim Grøstad wrote: Arrayviews ("slices") are available as a type so you can do it like this: Yeah, there's also the Array.slice and String.substring that work kinda

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 16:34:42 UTC, Meta wrote: Maybe because the static type system allows for overloading and so all of these utility functions don't have to do a million different things depending on what you pass to them. Yea. Another huge thing to me is the slice operator. I

Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 18:23:55 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 16:34:42 UTC, Meta wrote: Maybe because the static type system allows for overloading and so all of these utility functions don't have to do a million different things depending on what you

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 18:59:11 UTC, Ola Fosheim Grøstad wrote: Array.slice create value copies, not reference views. I don't think there is a "slice" for Array. :-/ Right, that's why I said "kinda similarly"... the copy is really important if you want to mutate it, but it is good

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 11:36:47 UTC, Sebastiaan Koppe wrote: I suppose you mean changing the contents of an existing script element. I was talking about inserting a new inline-script via html(). oh yeah, you are right. That's one thing I do like about D though: I find it so much

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 18:44:44 UTC, Ola Fosheim Grøstad wrote: Arrayviews ("slices") are available as a type so you can do it like this: Yeah, there's also the Array.slice and String.substring that work kinda similarly in old standard javascript. But there's still a lot of

Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 20:03:09 UTC, Adam D. Ruppe wrote: That's basically what my D->JS thing did back in 2011. Nice, so now you will do it again in 2016 ? ;) That actually worked somewhat well in my dtojs but it was a mild hassle too once function callbacks got more involved.

Re: Reasons to use D

2015-09-12 Thread Meta via Digitalmars-d
On Saturday, 12 September 2015 at 16:32:52 UTC, Adam D. Ruppe wrote: oh yeah, you are right. That's one thing I do like about D though: I find it so much easier to remember (perhaps because I wrote most the libs I use myself). I forget the difference between stuff like substr and substring in

Re: Reasons to use D

2015-09-12 Thread Bahman Movaqar via Digitalmars-d
On Friday, 11 September 2015 at 17:58:49 UTC, bachmeier wrote: On Friday, 11 September 2015 at 14:17:03 UTC, Bahman Movaqar wrote: On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: "3. The documentation poor." I agree but so is the documentation for virtually everything

Re: Reasons to use D

2015-09-12 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 12 September 2015 at 04:05:44 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote: That is not the only way it behaves differently. jQuery's html() will actually execute inline script, whereas innerHTML won't. I'm pretty sure it is the other

Re: Reasons to use D

2015-09-11 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 11 September 2015 at 15:37:45 UTC, Ola Fosheim Grøstad wrote: In the JavaScript world you have various versions of JavaScript, TypeScript, TypeScript+React, TypeScript+Angular, they coexists. So, as long as you can easily interface between languages it is ok. I think language

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 16:07:09 UTC, Sebastiaan Koppe wrote: I never understood those TypeScript people. They would learn a *new* language, just to compile it into JavaScript? It isn't a new language. It is where ECMAScript is going + structural typing and generics. The typing helps

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
Here's another recent D mention: http://cppcast.com/2015/09/scott-meyers/ at 16:35.

Re: Reasons to use D

2015-09-11 Thread bachmeier via Digitalmars-d
On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: C++ tends to be nice, yes. PHP isn't really any better than D, at least not when I was using it a few years ago. I recently decided to learn PHP just to learn PHP. I can confirm that the official docs are definitely worse than

Re: Reasons to use D

2015-09-11 Thread bachmeier via Digitalmars-d
On Friday, 11 September 2015 at 14:17:03 UTC, Bahman Movaqar wrote: On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: "3. The documentation poor." I agree but so is the documentation for virtually everything else I've ever used too. I'd take D's over Ruby's for example.

Re: Reasons to use D

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 11 September 2015 at 15:30:05 UTC, Sebastiaan Koppe wrote: Does it have to do with char encodings? Not the issue I hit: it has to do with the script tags being ripped out. It says "To set the content of a element, which does not contain HTML, use the .text() method and

Re: Reasons to use D

On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

Re: Reasons to use D

On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

Re: Reasons to use D

On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

Re: Reasons to use D

On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: jQuery has burned me in the past. BTW this is the lesson I've learned: have a couple examples for the most common case, ready to be copy/pasted AND explicitly call out the weird edge cases with examples learned from debugging

Re: Reasons to use D

On Friday, 11 September 2015 at 13:41:23 UTC, Ola Fosheim Grøstad wrote: Ruby and Python have their documentation on Slashdot... StackOverflow... Duh...

Re: Reasons to use D

On Friday, 11 September 2015 at 13:35:07 UTC, Namespace wrote: JQuery, PHP, C++? That the nicest docs I've ever seen. C++ tends to be nice, yes. PHP isn't really any better than D, at least not when I was using it a few years ago. jQuery has burned me in the past. Take this page for

Reasons to use D

Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on you: It doesn’t try to be multi-paradigm, it doesn’t clai

Re: Reasons to use D

On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on

Re: Reasons to use D

On Friday, 11 September 2015 at 19:54:55 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 15:30:05 UTC, Sebastiaan Koppe wrote: Does it have to do with char encodings? Not the issue I hit. Ah, forget about my suggestion, I misread something on the link you send. So when it said

Re: Reasons to use D

On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote: That is not the only way it behaves differently. jQuery's html() will actually execute inline script, whereas innerHTML won't. I'm pretty sure it is the other way around...

Re: Reasons to use D

On Friday, 11 September 2015 at 12:07:47 UTC, Jack Stouffer wrote: It's ironic, BECAUSE D is multi-paradigm it allows the author to believe it's not. When you have a C like syntax and a language that allows you to write your Java like code, and if you don't know about ranges, then I can

Re: Reasons to use D

On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on

Re: Reasons to use D

On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation for virtually everything else I've ever used too. I'd take D's over

Re: Reasons to use D

On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: "3. The documentation poor." I agree but so is the documentation for virtually everything else I've ever used too. I'd take D's over Ruby's for example. Couldn't help but to drop in and count two exceptions: Racket's

Re: Reasons to use D

On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: [...] The article is not that old, you know (May 2014). I recall when Scala came out, somebody published[1] a "intro/review" on Scala

Re: Reasons to use D

On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 13:35:07 UTC, Namespace wrote: JQuery, PHP, C++? That the nicest docs I've ever seen. C++ tends to be nice, yes. PHP isn't really any better than D, at least not when I was using it a few years

Re: Reasons to use D

On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: Here is another source for external D evaluations I missed, January 2015: http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language I find the viewpoints of the student who wrote

Re: Reasons to use D

On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: jQuery has burned me in the past. Take this page for example: http://api.jquery.com/html/ Tell me what it doesn't tell you... well, unless you know, you'll fail. Does it have to do with char encodings?

Re: Reasons to use D

On Friday, 11 September 2015 at 15:14:55 UTC, Chris wrote: the way it is. If not implementing breaking changes is an issue in D, why do people put up with C++'s backward compatibility then? Because of the lack of alternatives... But it is possible to do both. It is possible to bring current