February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Gabriele | On Wednesday, 14 February 2018 at 17:13:28 UTC, John Gabriele wrote:
> But even then, I don't think you should discount or put off using std.csv as "cheating".
Yes and no. The problem with all these exercises is that they say nothing about the language and a lot about some default library, which isn't particularly revealing.
For instance, Swift drags in all of Os-X on the default platform, so writing an audio/video loader would be relatively short in comparison to other languages. Would that be fair or instructive? Of course not. The Os-X libraries are quite massive.
Anyway, these kinds of exercises are only impressive for people looking for an alternative to scripting...
For general system programming you need to show off the language and not the esoteric features of the standard library. Basically show off how it can deal with a task it has not been designed for. Which is the typical use scenario.
|
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On 2018-02-14 19:00, Ola Fosheim Grøstad wrote: > For instance, Swift drags in all of Os-X on the default platform, so writing an audio/video loader would be relatively short in comparison to other languages. Would that be fair or instructive? Of course not. The Os-X libraries are quite massive. For a fair comparison Swift should only use libraries that are available both on macOS and Linux. -- /Jacob Carlborg |
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On Tuesday, 13 February 2018 at 23:35:36 UTC, Seb wrote: > Someone revived the Expressive C++17 Coding Challenge thread today and I thought this is an excellent opportunity to revive my blog and finally write an article showing why I like D so much: > > https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d > > It's mostly targeted at beginners as I explain many basic D features, but maybe it's helpful for beginners looking into D. Someone posted a comment in our subreddit that you may want to check: https://www.reddit.com/r/d_language/comments/7xi9n3/the_expressive_c17_coding_challenge_in_d/ |
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Wednesday, 14 February 2018 at 18:33:33 UTC, Jacob Carlborg wrote:
> On 2018-02-14 19:00, Ola Fosheim Grøstad wrote:
> For a fair comparison Swift should only use libraries that are available both on macOS and Linux.
Are any projects using Swift outside of the Mac eco system?
Would it be more fair if Swift was Mac only? (re Visual Basic)
Would you include React when evaluating Javascript and Angular4 when evaluating TypeScript? Why should a standard library be evaluated differently from any other library?
That's more the issue.
If the standard library for one language ensure better interop between third party libraries, then it becomes significant, but if it is an independent feature then I see no difference between standard library and third party library.
|
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to bachmeier | On Wednesday, 14 February 2018 at 18:55:23 UTC, bachmeier wrote: > On Tuesday, 13 February 2018 at 23:35:36 UTC, Seb wrote: >> Someone revived the Expressive C++17 Coding Challenge thread today and I thought this is an excellent opportunity to revive my blog and finally write an article showing why I like D so much: >> >> https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d >> >> It's mostly targeted at beginners as I explain many basic D features, but maybe it's helpful for beginners looking into D. > > Someone posted a comment in our subreddit that you may want to check: > https://www.reddit.com/r/d_language/comments/7xi9n3/the_expressive_c17_coding_challenge_in_d/ Thanks a lot for the ping! Someone posted it also to /r/programming - it's on the second place as of now: https://www.reddit.com/r/programming/comments/7xih66/the_expressive_c17_coding_challenge_in_d |
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On Wednesday, 14 February 2018 at 19:40:12 UTC, Seb wrote:
> https://www.reddit.com/r/programming/comments/7xih66/the_expressive_c17_coding_challenge_in_d
It is getting shot down…
|
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Wednesday, 14 February 2018 at 20:14:41 UTC, Ola Fosheim Grøstad wrote:
> On Wednesday, 14 February 2018 at 19:40:12 UTC, Seb wrote:
>> https://www.reddit.com/r/programming/comments/7xih66/the_expressive_c17_coding_challenge_in_d
>
> It is getting shot down…
That's implied when someone says it's posted on Reddit.
There's (almost) no such thing as bad publicity...
|
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to bachmeier | On Wednesday, 14 February 2018 at 20:37:24 UTC, bachmeier wrote:
> There's (almost) no such thing as bad publicity...
Programming languages and operating systems have a long history of hot advocacy... not sure how it relates to adoption, but it affects perception.
E.g. vocal mac users gave the mac a certain (not so great) reputation in tech circles. I don't think that perception changed till iOs and mac mini.
|
February 14, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On 2/13/2018 3:35 PM, Seb wrote:
> Someone revived the Expressive C++17 Coding Challenge thread today and I thought this is an excellent opportunity to revive my blog and finally write an article showing why I like D so much:
>
> https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d
>
> It's mostly targeted at beginners as I explain many basic D features, but maybe it's helpful for beginners looking into D.
Very nice article, you write well!
|
February 15, 2018 Re: The Expressive C++17 Coding Challenge in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On 2/13/18 6:35 PM, Seb wrote: > Someone revived the Expressive C++17 Coding Challenge thread today and I thought this is an excellent opportunity to revive my blog and finally write an article showing why I like D so much: > > https://seb.wilzba.ch/b/2018/02/the-expressive-c17-coding-challenge-in-d > > It's mostly targeted at beginners as I explain many basic D features, but maybe it's helpful for beginners looking into D. Nice article! Typos and Grammar: " How often how you encountered code like a + b" How often have --- "Yes, the D compiler does all the hard work for." for you --- "In short: the compiler does a few smart lowering for you" lowerings --- "Yes D is statically typed, but the compiler is pretty smart, so we can let him do all the hard for for us." hard work "auto is a filler word for the compiler that means “whatever the type of the assignment, use this as type of this variable”." the type --- "Okay to recap, we have taken the input of a file by line, splitted every line by commas" splitting --- This part is slightly incorrect: " Isn’t this done before the enforce is called? No, lazy is lazy and the string concatenation doesn’t happen at the caller site, but can be requested explicitly by the callee." Technically, the concatenation is done at compile-time, which can be seen via AST: https://run.dlang.io/is/OVKxee But normally, if the concatenation involved runtime strings, it would be done lazily. -Steve |
Copyright © 1999-2021 by the D Language Foundation