osdir.com
mailing list archive

Subject: [jira] Commented: (BOO-466) Element syntax. - msg#00178

List: lang.boo.devel

Date: Prev Next Index Thread: Prev Next Index
[ http://jira.codehaus.org/browse/BOO-466?page=comments#action_49511 ]

Arron Washington commented on BOO-466:
--------------------------------------

Basically, enumerable[CONDITION].{TRANSFORMATION ON ELEMENTS PASSING CONDITION}

> Element syntax.
> ---------------
>
> Key: BOO-466
> URL: http://jira.codehaus.org/browse/BOO-466
> Project: Boo
> Type: New Feature
> Components: Compiler
> Versions: 0.6
> Reporter: Arron Washington
> Fix For: 0.7.5

>
>
> (This is a feature request based on input from Doug and Sorin from #boo. If
> you're not in #boo, you're just not in!)
> Element wise operator syntax to allow for more compact generators (A) and for
> element-wise operations on two or more iterable items (B)
> EXAMPLE A:
> list = [1, 2, 3, 4, 5]
> filtered = array(int, list[it > 3])
> print filtered # " 4, 5 "
> That is in comparison to the current generator syntax:
> list = [1, 2, 3, 4, 5]
> filtered = array(int, e for e in list if e > 3)
> print filtered # "4, 5"
> EXAMPLE B:
> foo = [1, 2, 3, 4, 5]
> bar = [1, 2, 3, 4, 5]
> result = array(int, foo[it] * bar[it])
> print result #1, 4, 8, 16, 25
> Not sure I want to write the equivilent of what you have to do in Boo now.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira




Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

[jira] Commented: (BOO-466) Element syntax.

[ http://jira.codehaus.org/browse/BOO-466?page=comments#action_49510 ] Cameron Kenneth Knight commented on BOO-466: -------------------------------------------- Also, items.{it.Member} == items->Member > Element syntax. > --------------- > > Key: BOO-466 > URL: http://jira.codehaus.org/browse/BOO-466 > Project: Boo > Type: New Feature > Components: Compiler > Versions: 0.6 > Reporter: Arron Washington > Fix For: 0.7.5 > > > (This is a feature request based on input from Doug and Sorin from #boo. If > you're not in #boo, you're just not in!) > Element wise operator syntax to allow for more compact generators (A) and for > element-wise operations on two or more iterable items (B) > EXAMPLE A: > list = [1, 2, 3, 4, 5] > filtered = array(int, list[it > 3]) > print filtered # " 4, 5 " > That is in comparison to the current generator syntax: > list = [1, 2, 3, 4, 5] > filtered = array(int, e for e in list if e > 3) > print filtered # "4, 5" > EXAMPLE B: > foo = [1, 2, 3, 4, 5] > bar = [1, 2, 3, 4, 5] > result = array(int, foo[it] * bar[it]) > print result #1, 4, 8, 16, 25 > Not sure I want to write the equivilent of what you have to do in Boo now. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

Next Message by Date: click to view message preview

[jira] Created: (BOO-562) str[-1] gives IndexOutOfRangeException, but str[-1:] doesn't

str[-1] gives IndexOutOfRangeException, but str[-1:] doesn't ------------------------------------------------------------ Key: BOO-562 URL: http://jira.codehaus.org/browse/BOO-562 Project: Boo Type: Bug Reporter: Cameron Kenneth Knight str = 'alpha' print str[-1] == char('a') // IndexOutOfRange print str[-1:] == 'a' // true -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

Previous Message by Thread: click to view message preview

[jira] Commented: (BOO-466) Element syntax.

[ http://jira.codehaus.org/browse/BOO-466?page=comments#action_49510 ] Cameron Kenneth Knight commented on BOO-466: -------------------------------------------- Also, items.{it.Member} == items->Member > Element syntax. > --------------- > > Key: BOO-466 > URL: http://jira.codehaus.org/browse/BOO-466 > Project: Boo > Type: New Feature > Components: Compiler > Versions: 0.6 > Reporter: Arron Washington > Fix For: 0.7.5 > > > (This is a feature request based on input from Doug and Sorin from #boo. If > you're not in #boo, you're just not in!) > Element wise operator syntax to allow for more compact generators (A) and for > element-wise operations on two or more iterable items (B) > EXAMPLE A: > list = [1, 2, 3, 4, 5] > filtered = array(int, list[it > 3]) > print filtered # " 4, 5 " > That is in comparison to the current generator syntax: > list = [1, 2, 3, 4, 5] > filtered = array(int, e for e in list if e > 3) > print filtered # "4, 5" > EXAMPLE B: > foo = [1, 2, 3, 4, 5] > bar = [1, 2, 3, 4, 5] > result = array(int, foo[it] * bar[it]) > print result #1, 4, 8, 16, 25 > Not sure I want to write the equivilent of what you have to do in Boo now. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

Next Message by Thread: click to view message preview

[jira] Created: (BOO-536) Forms Designer generated code has bad indentation.

Forms Designer generated code has bad indentation. -------------------------------------------------- Key: BOO-536 URL: http://jira.codehaus.org/browse/BOO-536 Project: Boo Type: Bug Components: #develop addin Environment: SVN 611 Reporter: Arron Washington Create new WinForms project, add button, double-click button. private def Button1Click(sender as object, e as System.EventArgs): pass private button1 as System.Windows.Forms.Button #endregion private button1 ... is on the same indentation as "pass" which makes for invalid syntax in Boo. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by