Natural "for" Loop, using Plural / Singular transformations ??

olivier.chatelain@gmail.com
26 May 2006 12:51:40 -0400

          From comp.compilers

Related articles
Natural "for" Loop, using Plural / Singular transformations ?? olivier.chatelain@gmail.com (2006-05-26)
Re: Natural "for" Loop, using Plural / Singular transformations ?? owong@castortech.com (Oliver Wong) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? dmaziuk@bmrb.wisc.edu (Dimitri Maziuk) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? tom@infoether.com (Tom Copeland) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? 148f3wg02@sneakemail.com (Karsten Nyblad) (2006-06-03)
Re: Natural "for" Loop, using Plural / Singular transformations ?? dot@dotat.at (Tony Finch) (2006-06-05)
[6 later articles]
| List of all articles for this month |

From: olivier.chatelain@gmail.com
Newsgroups: comp.compilers
Date: 26 May 2006 12:51:40 -0400
Organization: Compilers Central
Keywords: design, question, comment
Posted-Date: 26 May 2006 12:51:39 EDT

Dear Compiler Cracks,


What about using Plural => Singular transformations to generate loop
variables from name of lists?




EXAMPLE:


    FOR dependency IN dependencies DO
            PRINT dependency.name
    END


= depenendcies -generates-> dependency =


    FORALL dependencies DO
            PRINT dependency.name
    END


The compiler would generate the "singular" loop variable "dependency"
from the List "dependencies" (Plural).


This would reduce the code size, improve those long, unreadable headers
and simply plain-editor refactoring.


Any comments?
Olivier


PS: This idea is ispired by "Ruby on Rails" ORM, using Plural for the
Database-Tables.
[OK, what's the plural of deer or sheep? Attempts to make programming
languages have a long history. Cobol was the first and I think the
most successful, and although it was very successful as a language,
giving us stuff like C structures, it was pretty much a failure as
English. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.