--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/CAH368SRc78aVqePUTntm65O%3DpQhdVfdO1f0po2ReQeD08r3R-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/CAB%3DtfTpCYJSOf5cicisdz3VbG_FZnc7iUPsUZUT63K5sJUvMng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
-- Igal Sapir Railo Core Developer http://getRailo.org/
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/533ACFBF.9050704%40getrailo.org.
If you had to choose to treat the arguments scope as a structure or array when using its member functions, would you prefer an array or a structure?
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/533B00D2.1000708%40vonner.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/CAKa5oqLGWkO7mZUifYR1w%2BfVhzLpUB4auXwAeN0ciRG2PKw_Yw%40mail.gmail.com.
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/1c64e375-af26-4cf2-b816-09e8063675fe%40googlegroups.com.
then they will either very quickly work out what's going on by reading the docs (oh hohohoho)
--Adam
No, it's not.What would be confusing would be to implement member functions in a way that don't match of the thing can be used with "procedural" functions. if I can call arrayLen(arguments), then I should be able to call arguments.len() (or whatever). Where there is a conflict (say the array "interface" and struct "interface" have same-named methods), then you'll need to give it some additional thought as to how to deal with that.
The arguments scope is not a struct,
so it would be "confusing" to implement its member functions as it it were.--Adam
On Wednesday, 2 April 2014 07:30:29 UTC+1, Michael Offner wrote:because it is confusing, see list/string function discussionMicha2014-04-01 20:12 GMT+02:00 Adam Cameron <dac...@gmail.com>:
On Tuesday, 1 April 2014 15:21:13 UTC+1, Adrian Lynch wrote:If you had to choose to treat the arguments scope as a structure or array when using its member functions, would you prefer an array or a structure?Why are we limiting this to an either/or scenario? The arguments scope is neither a struct nor an array, although it implements behaviour of both. So why not just reflect this in its methods?
--Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/61b6efd0-b740-48c1-b694-bc640552d8d6%40googlegroups.com.
Oh, and might I add you are beginning to start to sound like Adobe,
second-guessing how thick you perceive your community's developers are, and making dumbed-down decisions on that basis.If someone gets confused (and, hey, I'm not saying some people won't!), then they will either very quickly work out what's going on by reading the docs (oh hohohoho) or asking here / StackOverflow / etc. Then they will not be confused. Or they will be the sort of person who never stops being confused, and will not be helped, but there's no point in specifically addressing that sort of person, because they probably won't be using this stuff anyhow.
--Adam
On Wednesday, 2 April 2014 13:32:08 UTC+1, Adam Cameron wrote:No, it's not.What would be confusing would be to implement member functions in a way that don't match of the thing can be used with "procedural" functions. if I can call arrayLen(arguments), then I should be able to call arguments.len() (or whatever). Where there is a conflict (say the array "interface" and struct "interface" have same-named methods), then you'll need to give it some additional thought as to how to deal with that.
The arguments scope is not a struct, so it would be "confusing" to implement its member functions as it it were.--Adam
On Wednesday, 2 April 2014 07:30:29 UTC+1, Michael Offner wrote:because it is confusing, see list/string function discussionMicha2014-04-01 20:12 GMT+02:00 Adam Cameron <dac...@gmail.com>:
On Tuesday, 1 April 2014 15:21:13 UTC+1, Adrian Lynch wrote:If you had to choose to treat the arguments scope as a structure or array when using its member functions, would you prefer an array or a structure?Why are we limiting this to an either/or scenario? The arguments scope is neither a struct nor an array, although it implements behaviour of both. So why not just reflect this in its methods?
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/69028c09-4633-4dfe-b7bb-a2fb0561fefc%40googlegroups.com.
<cfscript>function test(){writeOutput(isStruct(arguments)); // Railo/ACF:truewriteOutput(isArray(arguments)); // Railo:true;ACF:false}test();</cfscript>
Array | |||
1 |
| ||
2 |
| ||
3 |
|
Array | |||
1 |
| ||
2 |
|
2014-04-02 14:41 GMT+02:00 Adam Cameron <dac...@gmail.com>:
Oh, and might I add you are beginning to start to sound like Adobe,that hurts ;-)
i asked myself, what is a "arguments" scope for me, a array a struct or both?For me it is clearly a s struct that can be used as array, but it is not a array.
So maybe it is just confusing for me ... (the arguments scope not the clothes)
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/4746247b-8b0a-4a9d-bd4d-b26a949d342f%40googlegroups.com.
function printArgs( ){
arguments.each( function( key ){
dump( key );
})
}
printArgs ( a = 1, b = 2, c = 3 );
function printArgs( ){
for( key in arguments )
dump( key );
}
printArgs ( a = 1, b = 2, c = 3 );
function printArgs( ){
printStruct( arguments );
}
function printStruct( struct data ){
arguments.data.each( function( key ){
dump( key );
})
}
printArgs ( a = 1, b = 2, c = 3 ); // this throws an error: Can't cast [a] string to a number value
printStruct( { a = 1, b = 2, c = 3 } ); // this works