Re: Interview at Lang.NEXT

2014-07-01 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Thursday, 5 June 2014 at 09:43:13 UTC, Jonathan M Davis via Digitalmars-d-announce wrote: Though I confess what horrifies me the most about dynamic languages is code like this if(cond) var = hello world; else var = 42; The fact that an if statement could change the type of a

Re: Interview at Lang.NEXT

2014-06-20 Thread Bruno Medeiros via Digitalmars-d-announce
On 17/06/2014 07:21, Jacob Carlborg wrote: On 16/06/14 16:00, Bruno Medeiros wrote: I sometimes tried to convince dynamic language proponents - the ones that write unittests at least - of the benefits of static typing, by stating that static typing is really just compile time unit-tests! (it

Re: Interview at Lang.NEXT

2014-06-17 Thread Jacob Carlborg via Digitalmars-d-announce
On 16/06/14 16:00, Bruno Medeiros wrote: I sometimes tried to convince dynamic language proponents - the ones that write unittests at least - of the benefits of static typing, by stating that static typing is really just compile time unit-tests! (it is actually) You can actually do compile

Re: Interview at Lang.NEXT

2014-06-16 Thread Bruno Medeiros via Digitalmars-d-announce
On 05/06/2014 08:30, Andrei Alexandrescu wrote: On 6/5/14, 7:59 AM, Nick Sabalausky wrote: So let me get this straight: There are programmers out there who find the occasional type annotations on some declarations to be significantly more work than following a convention of nearly *quadrupling*

Re: Interview at Lang.NEXT

2014-06-16 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/16/2014 10:00 AM, Bruno Medeiros wrote: Java, which dynamic language proponents like to bash for it's verbosity Static language proponents like to bash Java for its verbosity, too!

Re: Interview at Lang.NEXT

2014-06-10 Thread Mattcoder via Digitalmars-d-announce
Andrei's D Talk (Day 2) is up: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/D Matheus.

Re: Interview at Lang.NEXT

2014-06-10 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/10/14, 6:28 AM, Mattcoder wrote: Andrei's D Talk (Day 2) is up: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/D Matheus. Topics overlap a tad with NDC's so if you watched that you may want to skip over the portion between 7:41 and 15:42. Andrei

Re: Interview at Lang.NEXT

2014-06-07 Thread Burp via Digitalmars-d-announce
bearophile- Do you also have so much testing code in haskell? In my D code I have an average 2.5 lines of testing code or every 1 line of D code, probably thanks to the stronger typing of D (and I think my D/Python code is less buggy than Phobos). Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-07 Thread bearophile via Digitalmars-d-announce
Burp: Do you also have so much testing code in haskell? I am still a newbie in Haskell, so my Haskell usage patterns are not significant (but if you still want an answer: from what I've seen so far I need so much time and thinking to craft every single line of Haskell code that later

Re: Interview at Lang.NEXT

2014-06-06 Thread John Colvin via Digitalmars-d-announce
On Thursday, 5 June 2014 at 13:32:16 UTC, Bill Baxter via Digitalmars-d-announce wrote: On Thu, Jun 5, 2014 at 2:42 AM, Jonathan M Davis via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Though I confess what horrifies me the most about dynamic languages is code like

Re: Interview at Lang.NEXT

2014-06-06 Thread deadalnix via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei OK I noticed that I messed up in answering. I was saying that you 2 seems to be confused between LLVM and clang.

Re: Interview at Lang.NEXT

2014-06-06 Thread deadalnix via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 22:02:37 UTC, Adam D. Ruppe wrote: Yeah, I'm generally against it... but I have a weird view of typing. The way I see it, you should go either strong and static or dynamic and weak - I hate the middle ground. So, in my view: Best (like D): string a = 10; int b

Re: Interview at Lang.NEXT

2014-06-05 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/4/2014 3:43 PM, bearophile wrote: Nick Sabalausky: In my experience, using heavy dynamic typing throughout a program creates far more work (mainly debugging) than it avoids. Even in tiny ~100 line programs, I've spent large amounts of time tracking down bugs a sane compiler would have

Re: Interview at Lang.NEXT

2014-06-05 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/5/14, 7:59 AM, Nick Sabalausky wrote: So let me get this straight: There are programmers out there who find the occasional type annotations on some declarations to be significantly more work than following a convention of nearly *quadrupling* the amount of code they have to write? Two to

Re: Interview at Lang.NEXT

2014-06-05 Thread bearophile via Digitalmars-d-announce
Nick Sabalausky: to three lines of tests for every one line of real code is considered rapid development, My Python development is just development, it's not meant to be particularly rapid :-) And I don't think a 3:1 ratio is too much. Among the testing code I also count the doctests, the

Re: Interview at Lang.NEXT

2014-06-05 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-06-05 09:30, Andrei Alexandrescu wrote: I have to confess this echoes a few similar confusions I have about the use and advocacy of dynamically-typed languages. One argument I've heard a while back was that static type errors are not proportional response and that static types only

Re: Interview at Lang.NEXT

2014-06-05 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-06-04 21:30, Nick Sabalausky wrote: In my experience, using heavy dynamic typing throughout a program creates far more work (mainly debugging) than it avoids. Even in tiny ~100 line programs, I've spent large amounts of time tracking down bugs a sane compiler would have immediately

Re: Interview at Lang.NEXT

2014-06-05 Thread Jonathan M Davis via Digitalmars-d-announce
On Thu, 05 Jun 2014 09:30:44 +0200 Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 6/5/14, 7:59 AM, Nick Sabalausky wrote: So let me get this straight: There are programmers out there who find the occasional type annotations on some declarations

Re: Interview at Lang.NEXT

2014-06-05 Thread dennis luehring via Digitalmars-d-announce
Am 05.06.2014 11:42, schrieb Jonathan M Davis via Digitalmars-d-announce: if(cond) var = hello world; else var = 42; The fact that an if statement could change the type of a variable is just atrocious IMHO. Maybe I've just spent too much of my time in statically typed languages, but I

Re: Interview at Lang.NEXT

2014-06-05 Thread Bill Baxter via Digitalmars-d-announce
On Thu, Jun 5, 2014 at 2:42 AM, Jonathan M Davis via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Though I confess what horrifies me the most about dynamic languages is code like this if(cond) var = hello world; else var = 42; The fact that an if statement

Re: Interview at Lang.NEXT

2014-06-05 Thread Brian Rogoff via Digitalmars-d-announce
On Thursday, 5 June 2014 at 12:46:24 UTC, Atila Neves wrote: I don't know, but the only language I've used with no static types that made me comfortable was Common Lisp. That was a long time ago, but I think it was the ease of manually testing the code in a REPL that did it. Obviously today

Re: Interview at Lang.NEXT

2014-06-05 Thread Bill Baxter via Digitalmars-d-announce
On Thu, Jun 5, 2014 at 6:34 AM, Brian Rogoff via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: ML is the language of the future ;-) Yeh, it hasn't really caught on in the first 40 years since it was invented, but I'm sure it's about to explode any day now. :-) --bb

Re: Interview at Lang.NEXT

2014-06-05 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 5 June 2014 at 13:34:03 UTC, Brian Rogoff wrote: On Thursday, 5 June 2014 at 12:46:24 UTC, Atila Neves wrote: I don't know, but the only language I've used with no static types that made me comfortable was Common Lisp. That was a long time ago, but I think it was the ease of

Re: Interview at Lang.NEXT

2014-06-05 Thread Walter Bright via Digitalmars-d-announce
On 6/5/2014 6:31 AM, Bill Baxter via Digitalmars-d-announce wrote: But when it comes to tests, it's very convenient to just be able to fake any object by slapping some dummy functions in between curly braces. For example if I want a fake IWidthHaver instance, I just have to write x = {

Re: Interview at Lang.NEXT

2014-06-05 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-06-05 15:31, Bill Baxter via Digitalmars-d-announce wrote: On Thu, Jun 5, 2014 at 2:42 AM, Jonathan M Davis via Digitalmars-d-announce digitalmars-d-announce@puremagic.com mailto:digitalmars-d-announce@puremagic.com wrote: Though I confess what horrifies me the most about dynamic

Re: Interview at Lang.NEXT

2014-06-05 Thread Jonathan M Davis via Digitalmars-d-announce
On Thu, 05 Jun 2014 12:46:23 + Atila Neves via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On Thursday, 5 June 2014 at 09:43:13 UTC, Jonathan M Davis via Digitalmars-d-announce wrote: On Thu, 05 Jun 2014 09:30:44 +0200 Though I confess what horrifies me the most

Re: Interview at Lang.NEXT

2014-06-04 Thread Joakim via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ wtf, the Mid Quality video is 1280x720 resolution HD video, guess they think every programmer has a super-fast internet

Re: Interview at Lang.NEXT

2014-06-04 Thread Jonathan M Davis via Digitalmars-d-announce
On Wed, 04 Jun 2014 07:33:01 + Joakim via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ wtf,

Re: Interview at Lang.NEXT

2014-06-04 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/4/14, 9:33 AM, Joakim wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ wtf, the Mid Quality video is 1280x720 resolution HD video, guess they think every

Re: Interview at Lang.NEXT

2014-06-04 Thread Walter Bright via Digitalmars-d-announce
On 6/4/2014 2:08 AM, Andrei Alexandrescu wrote: FWIW I'm not sure high resolution is necessary or recommended when watching me :o). -- Andrei I look better at low res.

Re: Interview at Lang.NEXT

2014-06-04 Thread w0rp via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei I never post on Reddit myself, but I noticed the guy asking about Qt ports. Someone else can tell him about my

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei When that person made the statement about expressing his mental model in a simpler way that is still somewhat

Re: Interview at Lang.NEXT

2014-06-04 Thread Walter Bright via Digitalmars-d-announce
On 6/4/2014 4:27 AM, w0rp wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei I never post on Reddit myself, but I noticed the guy asking about Qt ports.

Re: Interview at Lang.NEXT

2014-06-04 Thread Ary Borenszweig via Digitalmars-d-announce
On 6/4/14, 1:27 PM, Meta wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei When that person made the statement about expressing his mental model in a

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: You still have to worry about types, though. Yes, but you can often get away without explicitly writing types in D, and there's always std.variant.Variant when you don't want to bother with them.

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
Meta: and there's always std.variant.Variant when you don't want to bother with them. How many good usages of D Variant do you know? Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 17:57:40 UTC, Ary Borenszweig wrote: Even in function signatures? alias var = std.variant.Variant; auto DoStuff(var x, var y) { //Do stuff with x and y }

Re: Interview at Lang.NEXT

2014-06-04 Thread Ary Borenszweig via Digitalmars-d-announce
On 6/4/14, 2:50 PM, Meta wrote: On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: You still have to worry about types, though. Yes, but you can often get away without explicitly writing types in D, and there's always std.variant.Variant when you don't want to bother with them.

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 17:55:15 UTC, bearophile wrote: How many good usages of D Variant do you know? Bye, bearophile It depends on what you mean by a good usage. I rarely ever use Variant, but you *can* use it if you need weak and/or dynamic typing.

Re: Interview at Lang.NEXT

2014-06-04 Thread Ary Borenszweig via Digitalmars-d-announce
On 6/4/14, 2:59 PM, Meta wrote: On Wednesday, 4 June 2014 at 17:57:40 UTC, Ary Borenszweig wrote: Even in function signatures? alias var = std.variant.Variant; auto DoStuff(var x, var y) { //Do stuff with x and y } Cool! It also looks nice too.

Re: Interview at Lang.NEXT

2014-06-04 Thread dennis luehring via Digitalmars-d-announce
Am 04.06.2014 19:57, schrieb Meta: On Wednesday, 4 June 2014 at 17:55:15 UTC, bearophile wrote: How many good usages of D Variant do you know? Bye, bearophile It depends on what you mean by a good usage. I rarely ever use Variant, but you *can* use it if you need weak and/or dynamic typing.

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:01:04 UTC, dennis luehring wrote: Am 04.06.2014 19:57, schrieb Meta: On Wednesday, 4 June 2014 at 17:55:15 UTC, bearophile wrote: How many good usages of D Variant do you know? Bye, bearophile It depends on what you mean by a good usage. I rarely ever use

Re: Interview at Lang.NEXT

2014-06-04 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:03:48 UTC, Ary Borenszweig wrote: Cool! It also looks nice too. you should check out my jsvar too https://github.com/adamdruppe/arsd/blob/master/jsvar.d weak typing and dynamic like javascript: import arsd.jsvar; void main() { var a = 10; var

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
Adam D. Ruppe: Of course, sometimes the type still matters, Haskell programmers have a very different attitude toward types. They do a kind of type-driven programming, even in small programs. They lay down the data types (like the algebraic data types that describe the data structures of

Re: Interview at Lang.NEXT

2014-06-04 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: On 6/4/14, 1:27 PM, Meta wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei When that

Re: Interview at Lang.NEXT

2014-06-04 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:14:22 UTC, Adam D. Ruppe wrote: On Wednesday, 4 June 2014 at 18:03:48 UTC, Ary Borenszweig wrote: clip void main() { var a = 10; var b = 20; b += a; b -= 4; import std.stdio; writeln(b); b = [1,2,3];

Re: Interview at Lang.NEXT

2014-06-04 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:37:24 UTC, Craig Dillabaugh wrote: But shouldn't the '26' be '1016'? In javascript it would, but I hate that so I did something more sane: + always coerces both operands to be numbers, then adds them. To get concat, we use the D operator ~.

Re: Interview at Lang.NEXT

2014-06-04 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:29:49 UTC, bearophile wrote: Haskell programmers have a very different attitude toward types. Aye, that's more like how I prefer to do it - I like to use separate types for virtually everything in real code.

Re: Interview at Lang.NEXT

2014-06-04 Thread Andrew Edwards via Digitalmars-d-announce
On 6/4/14, 2:37 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 18:14:22 UTC, Adam D. Ruppe wrote: On Wednesday, 4 June 2014 at 18:03:48 UTC, Ary Borenszweig wrote: clip void main() { var a = 10; var b = 20; b += a; b -= 4; import std.stdio;

Re: Interview at Lang.NEXT

2014-06-04 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/4/2014 2:33 PM, Craig Dillabaugh wrote: But using function templates and the like you can still get fairly 'Python-like' code in D. I find dealing with types to be one of the areas that requires the 'least' amount of mental effort in software development. I don't understand why people see

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
Nick Sabalausky: In my experience, using heavy dynamic typing throughout a program creates far more work (mainly debugging) than it avoids. Even in tiny ~100 line programs, I've spent large amounts of time tracking down bugs a sane compiler would have immediately pointed out with a

Re: Interview at Lang.NEXT

2014-06-04 Thread Dicebot via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 19:43:53 UTC, bearophile wrote: Nick Sabalausky: In my experience, using heavy dynamic typing throughout a program creates far more work (mainly debugging) than it avoids. Even in tiny ~100 line programs, I've spent large amounts of time tracking down bugs a sane

Re: Interview at Lang.NEXT

2014-06-04 Thread Ary Borenszweig via Digitalmars-d-announce
On 6/4/14, 3:33 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: On 6/4/14, 1:27 PM, Meta wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote:

Re: Interview at Lang.NEXT

2014-06-04 Thread Meta via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 20:10:51 UTC, Ary Borenszweig wrote: I was actually talking about having to specify types everywhere, like in function signatures, the fields of classes and structs, etc. You can still have a language that feels dynamic but is statically typed. The compiler

Re: Interview at Lang.NEXT

2014-06-04 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 18:54:00 UTC, Andrew Edwards wrote: On 6/4/14, 2:37 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 18:14:22 UTC, Adam D. Ruppe wrote: On Wednesday, 4 June 2014 at 18:03:48 UTC, Ary Borenszweig wrote: clip But shouldn't the '26' be '1016'? That should

Re: Interview at Lang.NEXT

2014-06-04 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 20:10:51 UTC, Ary Borenszweig wrote: On 6/4/14, 3:33 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: On 6/4/14, 1:27 PM, Meta wrote: On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: clip But

Re: Interview at Lang.NEXT

2014-06-04 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 21:02:21 UTC, Craig Dillabaugh wrote: However, my primary point was that adding a string to a number is really an 'undefined' operation. So I don't think such automatic casting is (generally) helpful. Yeah, I'm generally against it... but I have a weird view of

Re: Interview at Lang.NEXT

2014-06-04 Thread Ary Borenszweig via Digitalmars-d-announce
On 6/4/14, 6:11 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 20:10:51 UTC, Ary Borenszweig wrote: On 6/4/14, 3:33 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: On 6/4/14, 1:27 PM, Meta wrote: On Wednesday, 4 June 2014 at 06:19:05

Re: Interview at Lang.NEXT

2014-06-04 Thread Ben Boeckel via Digitalmars-d-announce
On Wed, Jun 04, 2014 at 19:13:32 -0300, Ary Borenszweig via Digitalmars-d-announce wrote: The problem comes when you need to refactor your code and swap one type for another. You have to change all ocurrences of that type in that situation for another. That's what polymorphism and type

Re: Interview at Lang.NEXT

2014-06-04 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 4 June 2014 at 22:13:33 UTC, Ary Borenszweig wrote: On 6/4/14, 6:11 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 20:10:51 UTC, Ary Borenszweig wrote: On 6/4/14, 3:33 PM, Craig Dillabaugh wrote: On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig wrote: On