digitalmars.D.learn - Pure
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (10/10) Jan 08 2014 Is pure meant to be a compiler hint so that it is up to the
- bearophile (7/9) Jan 08 2014 Nope, it's enforced by the compiler. (But its rules are not
- John Colvin (6/16) Jan 08 2014 pure is enforced by the compiler (bugs allowing...). However, D
- Paolo Invernizzi (6/16) Jan 08 2014 This one is a good introduction, or at least the best one I can
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (5/8) Jan 08 2014 And very hard to translate! :) In case a Turkish reader is interested,
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (3/6) Jan 08 2014 So, "saflik" is "pure" in turkish, cool! I like the sound of it.
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (10/15) Jan 08 2014 On 01/08/2014 11:39 AM, "Ola Fosheim Grøstad"
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (5/15) Jan 09 2014 I am trying very hard to put the "action" phoneme into "saflık",
- John Carter (44/56) Jan 08 2014 Leaping off the immediate topic of computer language D into the realm
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (8/14) Jan 08 2014 What made is harder to translate was myself because I found some of the
- Meta (4/54) Jan 09 2014 On a small tangent, I believe the Sapir-Whorf thesis has been
Is pure meant to be a compiler hint so that it is up to the programmer to enforce it? It is sometimes useful to maintain hidden state for lazy evaluation, that does not affect purity optimizations: e.g. a = foo(1) // evaluates, caches and returns value b = foo(1) // returns cached value c = foo (1) // returns cached value is optimized to a = b = c = foo(1) // evaluates, caches and returns value
Jan 08 2014
Ola Fosheim Grøstad:Is pure meant to be a compiler hint so that it is up to the programmer to enforce it?Nope, it's enforced by the compiler. (But its rules are not immediately obvious, there are three kinds of purity, strong, weak and constant purity, etc). There are several corners cases, etc. Bye, bearophole
Jan 08 2014
On Wednesday, 8 January 2014 at 18:40:46 UTC, Ola Fosheim Grøstad wrote:Is pure meant to be a compiler hint so that it is up to the programmer to enforce it? It is sometimes useful to maintain hidden state for lazy evaluation, that does not affect purity optimizations: e.g. a = foo(1) // evaluates, caches and returns value b = foo(1) // returns cached value c = foo (1) // returns cached value is optimized to a = b = c = foo(1) // evaluates, caches and returns valuepure is enforced by the compiler (bugs allowing...). However, D purity has more shades to it than the black and white concept that most are familiar with. I'll leave it to someone who knows better to explain it.
Jan 08 2014
On Wednesday, 8 January 2014 at 19:04:24 UTC, John Colvin wrote:On Wednesday, 8 January 2014 at 18:40:46 UTC, Ola Fosheim Grøstad wrote:This one is a good introduction, or at least the best one I can remember: http://klickverbot.at/blog/2012/05/purity-in-d/ Very well written, a pleasure to read. /PaoloIs pure meant to be a compiler hint so that it is up to the programmer to enforce it? It is sometimes useful to maintain hidden state for lazy evaluation, that does not affect purity optimizations:pure is enforced by the compiler (bugs allowing...). However, D purity has more shades to it than the black and white concept that most are familiar with. I'll leave it to someone who knows better to explain it.
Jan 08 2014
On 01/08/2014 11:09 AM, Paolo Invernizzi wrote:This one is a good introduction, or at least the best one I can remember: http://klickverbot.at/blog/2012/05/purity-in-d/ Very well written, a pleasure to read.And very hard to translate! :) In case a Turkish reader is interested, here is the translation: http://ddili.org/makale/saflik.html Ali
Jan 08 2014
On Wednesday, 8 January 2014 at 19:26:28 UTC, Ali Çehreli wrote:And very hard to translate! :) In case a Turkish reader is interested, here is the translation: http://ddili.org/makale/saflik.htmlSo, "saflik" is "pure" in turkish, cool! I like the sound of it. 8-D
Jan 08 2014
On 01/08/2014 11:39 AM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:> On Wednesday, 8 January 2014 at 19:26:28 UTC, Ali Çehreli wrote:It is never easy, is it? :) The reason it is "saflik" in the URL is because file names better be in ASCII due to different capabilities of different file systems. The word is actually "saflık". saf means pure and saflık means "purity". The vowel ı does not appear in English: It is close to the sound made just before the 'n' in "action" but not exactly the same. AliAnd very hard to translate! :) In case a Turkish reader is interested, here is the translation: http://ddili.org/makale/saflik.htmlSo, "saflik" is "pure" in turkish, cool! I like the sound of it. 8-D
Jan 08 2014
On Wednesday, 8 January 2014 at 21:37:24 UTC, Ali Çehreli wrote:On 01/08/2014 11:39 AM, "Ola Fosheim Grøstad"I am trying very hard to put the "action" phoneme into "saflık", not sure if I got it irght, but I still like the sound of it! :-) And thanks to the list members that put some light on the diversity of "pure" in D, for me.So, "saflik" is "pure" in turkish, cool! I like the sound ofit. 8-D It is never easy, is it? :) The reason it is "saflik" in the URL is because file names better be in ASCII due to different capabilities of different file systems. The word is actually "saflık". saf means pure and saflık means "purity". The vowel ı does not appear in English: It is close to the sound made just before the 'n' in "action" but not exactly the same.
Jan 09 2014
Very well written, a pleasure to read.And very hard to translate! :)Leaping off the immediate topic of computer language D into the realm of human languages English and Turkish... With the Sapir–Whorf hypothesis in the back of my mind... What makes it harder to translate? Is there a human language in which these concepts would be more easily discussed? I was always fascinated by early translations (1980 and before era) of Japanese machine manuals... It was tempting to find the mistranslations funny, until I realised... * You could never remember the words. Your memory is fundamentally governed by the language you speak. Thus when you try remember (and relate to a colleague) a subtly garbled chunk of that language, your brain autocorrects it and refuses to reproduce the mistakes! * The differences indicated curious and subtle differences in thought processes of the original authors and translators. Not better or worse processes. Different. Interesting. Subtle. * The categories of mistakes made by, say German German to English translators, were very different. So I have always been fascinated by Sapir-Whorf, but it seems to be very subtle and nuanced and unexpected in practical effect. On Thu, Jan 9, 2014 at 8:26 AM, Ali Çehreli <acehreli yahoo.com> wrote:On 01/08/2014 11:09 AM, Paolo Invernizzi wrote:-- John Carter Phone : (64)(3) 358 6639 Tait Electronics PO Box 1645 Christchurch New Zealand -- ------------------------------ This email, including any attachments, is only for the intended recipient. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If you are not an intended recipient, you may not use, disseminate, distribute or reproduce such email, any attachments, or any part thereof. If you have received a message in error, please notify the sender immediately and erase all copies of the message and any attachments. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission nor can we guarantee that any email or any attachments are free from computer viruses or other conditions which may damage or interfere with recipient data, hardware or software. The recipient relies upon its own procedures and assumes all risk of use and of opening any attachments. ------------------------------This one is a good introduction, or at least the best one I can remember: http://klickverbot.at/blog/2012/05/purity-in-d/ Very well written, a pleasure to read.And very hard to translate! :) In case a Turkish reader is interested, here is the translation: http://ddili.org/makale/saflik.html Ali
Jan 08 2014
On 01/08/2014 12:20 PM, John Carter wrote:What made is harder to translate was myself because I found some of the sentences in the original article more complicated than my little mind could handle. :) I find languages fascinating myself. Agreeing with everything you said, merely the innateness of the whole thing and the way languages mutate on their own is sufficient fascination for me. AliVery well written, a pleasure to read.And very hard to translate! :)Leaping off the immediate topic of computer language D into the realm of human languages English and Turkish... With the Sapir–Whorf hypothesis in the back of my mind... What makes it harder to translate?
Jan 08 2014
On Wednesday, 8 January 2014 at 20:21:22 UTC, John Carter wrote:On a small tangent, I believe the Sapir-Whorf thesis has been disproved. However, I definitely think there might be a similar effect of programming languages on programmers.Very well written, a pleasure to read.And very hard to translate! :)Leaping off the immediate topic of computer language D into the realm of human languages English and Turkish... With the Sapir–Whorf hypothesis in the back of my mind... What makes it harder to translate? Is there a human language in which these concepts would be more easily discussed? I was always fascinated by early translations (1980 and before era) of Japanese machine manuals... It was tempting to find the mistranslations funny, until I realised... * You could never remember the words. Your memory is fundamentally governed by the language you speak. Thus when you try remember (and relate to a colleague) a subtly garbled chunk of that language, your brain autocorrects it and refuses to reproduce the mistakes! * The differences indicated curious and subtle differences in thought processes of the original authors and translators. Not better or worse processes. Different. Interesting. Subtle. * The categories of mistakes made by, say German German to English translators, were very different. So I have always been fascinated by Sapir-Whorf, but it seems to be very subtle and nuanced and unexpected in practical effect. On Thu, Jan 9, 2014 at 8:26 AM, Ali Çehreli <acehreli yahoo.com> wrote:On 01/08/2014 11:09 AM, Paolo Invernizzi wrote:This one is a good introduction, or at least the best one I can remember: http://klickverbot.at/blog/2012/05/purity-in-d/ Very well written, a pleasure to read.And very hard to translate! :) In case a Turkish reader is interested, here is the translation: http://ddili.org/makale/saflik.html Ali
Jan 09 2014