--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5a87ea0b-79d8-4b51-b986-6dae02534d4e%40googlegroups.com.
+1
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG1WijXst%3DRnVkiQVY%3DCZMSjSRv6LC%3DE_eymByBvOBNXqheYBA%40mail.gmail.com.
+1 for me too… maybe we could think about a constructor keyword too?
Sincerely
Gert Franz
RASIA GmbH
Spittelgasse 7
5103 Moeriken-Wildegg
Email: ge...@rasia.ch
Skype: gert.franz
Phone Switzerland: +41 76 5680 231
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/4D305DEF-B694-4568-82C3-73F0BABD13E8%40gmail.com.
I completely agree :)
https://bitbucket.org/lucee/lucee/issue/82/5x-proposal-class-syntax
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/92bde911-617d-496b-ac2f-11cef12fe4df%40googlegroups.com.
I would only like that with proper constructors. A discussion about constructors was started a while ago, including some proposals. The 'init' convention has served us well, but if something is going to be called a class, I think a proper constructor is required. If 'class' is just an alias for 'component', you might lose the opportunity to do something about this in the future.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/601dde84-d298-4725-9b85-2b523e1df5f2%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/48fb6ad2-4457-4820-b1fd-05fbf48d3438%40googlegroups.com.
we will also discuss in the tech board to add support for listeners that you get access before the constructors are executed.
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/MzOw82hnzEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEByHZj%3Du5m3%3DV6nEwVreDALRMVAGcae68w6HfD8jMLADdw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/67B32536-2BE5-4996-A064-83CD25ECDA2E%40neoneo.nl.
class {
public any myFunctionName() {
}
}
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/MzOw82hnzEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/922d9232-4ae3-4545-846f-3cdba1775734%40googlegroups.com.
+1 for that! (or +infinity if that helps)The keyword is needed (I presume) because all modifiers are optional. You're allowed to write:class {function myFunctionName() {}}Without the keyword, it would be harder for the parser to distinguish between a function declaration and a function call (in the pseudo-constructor).
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/922d9232-4ae3-4545-846f-3cdba1775734%40googlegroups.com.
what's about closures?susi=function(){};should we do this?susi=(){};this would raise the question if we should only support Lambda functions then (with closure enviroment)...
Micha
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/0be6b092-4fef-48ee-a098-73f93344d22e%40googlegroups.com.
I think because you can access them from remote, so you could say it is more than just a class it is a component...
maybe Sean Corfield has some insight on this …
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/67A8AD94-2E83-405B-946C-B1927896265A%40corfield.org.
I like Jeroen's suggestion in that regard, and will expound upon it:
Options:
1. Disallow non-constant expressions in the immediate body of the class, so that you cannot call a tag there.
2. As soon as you specify an access modifier (public, private, static, abstract), the function keyword becomes optional.
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/MzOw82hnzEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEBzBV1oa8Dkn6kz3CX0YCW62jwaYP3h%2B5%3DQxd-BBO%3DMqAA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMZ7h4gbGRU3C6ud4Qwn4nznyAtX5rPy7sb%3DwA4C_LpWT%2Bjrtg%40mail.gmail.com.
class {
// could be valid - this is a "constant expression" where the value is known at compile time
this.value = 1;
// invalid - these are dynamic, and cannot be known at compile time
this.queryData = queryExecute("select * from somewhere");
this.data = url.param;
// invalid - tag execution
mail subject="instance created" to="some....@individu.al" {
writeoutput("why would you want emails everytime an instance is made???");
}
// invalid - these scopes should not be available here
application.instance = this;
request.instance = this;
session.instance = this;
// this is kinda tricky, it feels invalid to me - definitely unnecessary as you should be writing this as a member instead of assigning a closure, but it is a "constant expression" so idk...
this.closure = function() {}
public <however you define the constructor>() {
// all the above would be valid here...
}
}
what's about closures?susi=function(){};should we do this?susi=(){};
this would raise the question if we should only support Lambda functions then (with closure enviroment)...
Outside of a class, then yes, you would need the function keyword.
On Apr 23, 2015, at 5:52 AM, Michael Offner <mic...@lucee.org> wrote:I think because you can access them from remote, so you could say it is more than just a class it is a component...maybe Sean Corfield has some insight on this …
"1. Disallow non-constant expressions in the immediate body of the class, so that you cannot call a tag there."no support for a constructor in the component body anymore or just limited?
<cfscript>
/* index.cfm */
// plain jane function - not a closure.
function blah() {
return 1;
}
</cfscript>
For situations like this:
<cfscript>
/* index.cfm */
// plain jane function - not a closure.
function blah() {
return 1;
}
</cfscript>Also, because in general, CFScript is based moreso on ECMAScript. However, since going into defining a class syntax is new territory, I'm fine with supporting the idea that class member methods do not need the function keyword. In an effort to avoid scope-creep, I'd say at least for the time being, leave other function definitions alone.